GATEverse
← GATE CSE 2016 Set 2

Q52

NAT2 marks

Consider the following database table named water_schemes:

\overset{\text{Water_schemes}}{\begin{array}{|c|c|c|}\hline \textbf{scheme_no}& \textbf{district_name}& \textbf{capacity} \\\hline 1& \text{Ajmer}& 20 \\ \hline 1& \text{Bikaner}& 10 \\ \hline 2& \text{Bikaner}& 10 \\\hline 3& \text{Bikaner}&20 \\\hline 1& \text{Churu}& 10 \\\hline 2& \text{Churu}& 20 \\\hline 1& \text{Dungargarh}& 10 \\\hline \end{array}}

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

Sign in to save attempts.

Loading…