GATE CS 2017 (Afternoon) — Question 46

Database Management Systems (DBMS)SQL Queries (DDL/DML, Joins, Aggregations)NAT2 marksMedium

Consider the following database table named top\_scorer.
Question image
Consider the following SQL query:
sql
1SELECT ta.player FROM top_scorer as ta
2WHERE ta.goals > ALL (SELECT tb.goals
3                      FROM top_scorer as tb
4                      WHERE tb.country = 'Spain')
5AND ta.goals > ANY (SELECT tc.goals
6                    FROM top_scorer as tc
7                    WHERE tc.country = 'Germany')
8
The number of tuples returned by the above SQL query is ________.
Practise the full 2017-AN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkDatabase System Concepts (Korth)Normalisation, SQL, transactions and indexing — the DBMS syllabus in one book.
Practise more on SQL Queries (DDL/DML, Joins, Aggregations)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group