Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

Draw an activity diagram for student card scanning for attendance.

Answered: 1 week ago