But is that really different from the point of view of the developer? As long as the column is not used in the output it's just a variable.
I elaborate because I checked the examples since my first comment:
There are two derive sections in introduction.prql.
derive [ # This adds columns / variables. gross_salary = salary + payroll_tax, gross_cost = gross_salary + benefits_cost # Variables can use other variables. ]
From my point of view that would be
let gross_salary = salary + payroll_tax let gross_cost = gross_salary + benefits_cost
By the way, in the examples I saw
select [name, salary, average_country_salary]
select name, salary, average_country_salary
aggregate average_country_salary = (average salary)
And why not only one type of brackets? Example: the join clause
join average_salaries [==country]
JOIN average_salaries ON newest_employees.country = average_salaries.country
That's a condition and we're conditioned to put conditions inside (), as in if () {} else {}
And omit == by default, so
join average_salaries (country)
remove col1, col2
But is that really different from the point of view of the developer? As long as the column is not used in the output it's just a variable.
I elaborate because I checked the examples since my first comment:
There are two derive sections in introduction.prql.
Note the comments about "columns / variables" and "Variables can use other variables", so the distinction is probably not very clear even now.From my point of view that would be
Then I'd get gross_salary and gross_cost in the result or not, according to the select I'm doing at the end. [1]By the way, in the examples I saw
which has some unnecessary brackets. Why not just omitting them? Same for the parentheses in Maybe omitting [ ] and ( ) would make the parser too complex but I'm all in to offload work to computers instead of to developers :-)And why not only one type of brackets? Example: the join clause
which gets compiled to Why square brackets there instead of round ones?That's a condition and we're conditioned to put conditions inside (), as in if () {} else {}
And omit == by default, so
[1] Edit: maybe you can add a negative select, to remove columns from the output. Maybe: That would be handy where there are 100 columns and one wants to remove only 5 of them. No need to enumerate the other 95.