Question: Consider relation Nobel ( name , category,year ) , recording winner names, categories, and years of Nobel prizes. The category could be peace, or chemistry,

Consider relation Nobel(name,category,year), recording winner names, categories, and years of Nobel prizes. The category could be "peace", or "chemistry", for example. Consider the following SQL expression:
with N as
(select name, count(*) as number
from Nobel
group by name)
select *
from N natural join
(select max(number) as number from N)
Which of the following statements are correct?
1.
An equivalent way to write the same query in SQL is as follows:
with N as
(select name, count(*) as number
from Nobel
group by name)
select *
from (select name from Nobel) natural join
(select max(number) as number from N)
2.
This expression returns the names of people who won the most Nobel prizes, together with how many prizes that was.
3.
This expression returns the names of people who won Nobel prizes in the most different categories, together with how many categories that was.
4.
An equivalent way to write the same query in SQL is as follows:
select name, max(number)
from (select name, count(*) as number
from Nobel
group by name)
group by name
5.
This expression returns, for each Nobel prize winner, the number of prizes they have won.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!