GATE Computer Science (CS) 2016 Shift 2 Solved Paper

© examsiri.com
Question : 62 of 65
 
Marks: +1, -0
Consider the following database table named water_schemes:
Water_schemes
Scheme_no
District_name
Capacity
1
Ajmer
20
1
Bikaner
10
2
Bikaner
10
3
Bikaner
20
1
Churu
10
2
Churu
20
1
Dungargarh
10
 
The number of tuples returned by the following SQL query is ______.
with total (name, capacity) as
            select district_name, sum(capacity)
            from water_schemes
            group by district_name
with total_avg (capacity) as
            select avg (capacity)
from total
select name
            from total, total_avg
            where total.capacity ≥ total_avg.capacity
  • Your Answer:
Go to Question: