GATE CS 2016, set 2 · Question 62 · Databases · Numerical answer (NAT) · 2 marks · no negative marks

Consider the following database table named water_schemes :
water_schemes
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

scheme_nodistrict_namecapacity
1Ajmer20
1Bikaner10
2Bikaner10
3Bikaner20
1Churu10
2Churu20
1Dungargarh10
Answer

Answer 2

Answer from the official GATE CS 2016 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes