2 ms·
WHERE and HAVING (and QUALIFY) are redundant. The PRQL language unifies them into a single "filter" construct: SQL: SELECT country, MAX(salary) AS max_sal
by _dain_ 2y ago
WHERE and HAVING (and QUALIFY) are redundant. The PRQL language unifies them into a single "filter" construct:
SQL:
SELECT country, MAX(salary) AS max_salary
FROM employees
WHERE start_date > DATE '2021-01-01'
GROUP BY country
HAVING MAX(salary) > 100000
PRQL:
from employees
filter start_date > @2021-01-01
group country (
aggregate {max_salary = max salary}
)
filter max_salary > 100_000