Thursday, August 23, 2007

Select statements.

Show who won the 1962 prize for Literature.
SELECT winner
FROM nobel
WHERE yr = 1962
AND subject = 'Literature'

2) Show the year and subject that won 'Albert Einstein' his prize.
select yr,subject from nobel where winner like 'Albert Einstein';

3)Give the name of the 'Peace' winners since the year 2000, including 2000.
select winner from nobel where subject = 'peace' and yr >= 2000;

4) Show all details (yr, subject, winner) of the Literature prize winners for 1980 to 1989 inclusive.
select * from nobel where subject = 'Literature' and yr between 1980 and 1989;

5) Show all details of the presidential winners: ('Theodore Roosevelt', 'Woodrow Wilson', 'Jed Bartlet', 'Jimmy Carter')
select * from nobel where winner in ('Theodore Roosevelt', 'Woodrow Wilson', 'Jed Bartlet', 'Jimmy Carter');

6)
Show the winners with first name John
select winner from nobel where winner like 'john%';

1 comment:

Unknown said...

If you believe in yourself and have dedication and pride - and never quit, you'll be a winner. The price of victory is high but so are the rewards. See the link below for more info.


#winner
www.ufgop.org