--- source: prql/tests/integration/examples.rs expression: sql input_file: prql/tests/integration/examples/variables-2.prql --- WITH table_0 AS ( SELECT emp_no, AVG(salary) AS emp_salary FROM employees GROUP BY emp_no ), table_1 AS ( SELECT TOP (10) AVG(emp_salary) / 1000 AS salary_k FROM table_0 JOIN titles USING(emp_no) GROUP BY title ) SELECT *, salary_k * 1000 AS salary FROM table_1