Here I have a table, I would like to query the average salary of departments, the SQL statement should be
select dept_name, avg(salary) from employee
I try to express this SQL in relational algebra. My assumption is as follows.
You can see that
dept_name is not wrapped by an aggregation function, which is not following the standard.
Is my expression correct?
What is the right way to express the combination of aggregation and projection?