Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2017 Set 2
Questions

Q46

NAT2 marksDatabases

Consider the following database table named top_scorer\text{top\_scorer}.

playercountrygoalsKloseGermany16RonaldoBrazil15G MullerGermany14FontaineFrance13PeleBrazil12KlinsmannGermany11KocsisHungary11BatistutaArgentina10CubillasPeru10LatoPoland10LinekerEngland10T MullerGermany10RahnGermany10top_scorer\overset{\text{top\_scorer}}{\begin{array}{|c|c|c|}\hline\\ \textbf{player}& \textbf{country}& \textbf{goals} \\\hline \text{Klose}& \text{Germany}& 16\\ \hline \text{Ronaldo}& \text{Brazil}& 15 \\ \hline \text{G Muller}& \text{Germany}& 14 \\\hline \text{Fontaine}& \text{France}& 13 \\\hline \text{Pele}& \text{Brazil}& 12 \\\hline \text{Klinsmann}& \text{Germany}& 11 \\\hline \text{Kocsis}& \text{Hungary}& 11 \\\hline \text{Batistuta}& \text{Argentina}&10 \\\hline \text{Cubillas}& \text{Peru}&10 \\\hline \text{Lato}& \text{Poland}& 10 \\\hline \text{Lineker}& \text{England}& 10 \\\hline \text{T Muller}& \text{Germany}& 10 \\\hline \text{Rahn}& \text{Germany}& 10 \\\hline \end{array}}

Consider the following SQL query:

SELECT ta.player FROM top_scorer AS ta
WHERE ta.goals >ALL (SELECT tb.goals
                     FROM top_scorer AS tb
                     WHERE tb.country = 'Spain')
  AND ta.goals > ANY (SELECT tc.goals
                      FROM top_scorer AS tc
                      WHERE tc.country='Germany')

The number of tuples returned by the above SQL query is ______

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.