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 ______.
| player | country | goals |
|---|---|---|
| Klose | Germany | 16 |
| Ronaldo | Brazil | 15 |
| G Müller | Germany | 14 |
| Fontaine | France | 13 |
| Pelé | Brazil | 12 |
| Klinsmann | Germany | 11 |
| Kocsis | Hungary | 11 |
| Batistuta | Argentina | 10 |
| Cubillas | Peru | 10 |
| Lato | Poland | 10 |
| Lineker | England | 10 |
| T Müller | Germany | 10 |
| Rahn | Germany | 10 |
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