kysely-org / kysely

A type-safe typescript SQL query builder
https://kysely.dev
MIT License
10.22k stars 259 forks source link

Add select from multiple tables and option to join other columns under alias #894

Closed CzechCoder closed 6 months ago

CzechCoder commented 6 months ago

When building a query to join tables, I can only make a select on the first table, but not on the second. In other words, I have a table that has a status column and I'm joining from another table that also has status column. I'd like to join the other status under an alias but it doesn't work. It'd be great to have the option to alias the joined column by selecting it as such.

koskimas commented 6 months ago

https://kyse.link/wcbTF