Re:Show HN: PRQL 0.2 – a better SQL
by throwaway236324 on Tuesday June 28, 2022 @04:43AM
(#31905542)
Have you considered using "optional"? I feel that this would be a more natural syntax for joins. It could default to "left join", which is probably more frequently used than a right join.
from employees
join optional positions [id==employee_id]
--> LEFT JOIN
from employees
join positions [id==employee_id]
--> JOIN
Then you'd use "optional right" or something similar for the "right join" case
from employees join optional positions [id==employee_id] --> LEFT JOIN
from employees join positions [id==employee_id] --> JOIN
Then you'd use "optional right" or something similar for the "right join" case