Question: Consider the query: Rewrite this query without using the with construct. with dept_total (dept_name, value) as (select dept_name, sum(salary) from instructor group by dept_name), dept_total_avg(value)
Consider the query:
Rewrite this query without using the with construct.
with dept_total (dept_name, value) as (select dept_name, sum(salary) from instructor group by dept_name), dept_total_avg(value) as (select avg(value) from dept_total) select dept_name from dept_total, dept_total_avg where dept_total.value >= dept_total_avg.value;
Step by Step Solution
3.36 Rating (171 Votes )
There are 3 Steps involved in it
There are several ways to write this query One way is to use subqueries ... View full answer
Get step-by-step solutions from verified subject matter experts
