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

Consider the following database table named top_scorer .
top_scorer
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 ______.

playercountrygoals
KloseGermany16
RonaldoBrazil15
G MüllerGermany14
FontaineFrance13
PeléBrazil12
KlinsmannGermany11
KocsisHungary11
BatistutaArgentina10
CubillasPeru10
LatoPoland10
LinekerEngland10
T MüllerGermany10
RahnGermany10
Answer

Answer 7

Answer from the official GATE CS 2017 answer key.

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