Using the MySql database management system that is running on
your Ubuntu virtual machine, answer the following questions.
Create a database with one table containing the following formation
about Nobel Laureate winners:
YEAR SUBJECT WINNER COUNTRY CATEGORY
1970 Physics Hannes Alfven Sweden Scientist
1970 Physics Louis Neel France Scientist
1970 Chemistry Luis Federico Leloir France Scientist
1970 Physiology Ulf von Euler Sweden Scientist
1970 Physiology Bernard Katz Germany Scientist
1970 Literature Aleksandr Solzhenitsyn Russia Linguist
1970 Economics Paul Samuelson USA Economist
1970 Physiology Julius Axelrod USA Scientist
1971 Physics Dennis Gabor Hungary Scientist
1971 Chemistry Gerhard Herzberg Germany Scientist
1971 Peace Willy Brandt Germany Chancellor
1971 Literature Pablo Neruda Chile Linguist
1971 Economics Simon Kuznets Russia Economist
1978 Peace Anwar al-Sadat Egypt President
1978 Peace Menachem Begin Israel Prime Minister
1987 Chemistry Donald J. Cram USA Scientist
1987 Chemistry Jean-Marie Lehn France Scientist
1987 Physiology Susumu Tonegawa Japan Scientist
1994 Economics Reinhard Selten Germany Economist
1994 Peace Yitzhak Rabin Israel Prime Minister
1987 Physics Johannes Georg Bednorz Germany Scientist
1987 Literature Joseph Brodsky Russia Linguist
1987 Economics Robert Solow USA Economist
1994 Literature Kenzaburo Oe Japan Linguist
Write the following SQL queries and show the corresponding output of the DBMS:
1) Write an SQL statement to display all the information of all
Nobel Laureate winners.
2) Write an SQL statement to display the string "Hello,
World!".
3) Write an SQL query to display the result of the following
expression: 2 * 14 +76.
4) Write an SQL statement to display the winner and category of all
Laureate winners.
5) Write an SQL query to find the winner(s) of the 1987 prize for
Chemistry.
6) Write an SQL query to find the subject and category for which
'Paul Samuelson' won his Nobel Prize.
7) Write an SQL query to give the name of the 'Linguist' winners
before year 2000.
8) Write an SQL query to show all the details of the Economics and
Literature Subject prize winners between the years 1971 to 1990
inclusive.
9) Write an SQL query to show all the details of the winners with
the letters sequence 'er' in their names.
If you have any doubts, please give me comment...
-- 1
SELECT *
FROM NobelLaureateWinners;
-- 2
SELECT "Hello, World!";
-- 3
SELECT 2*14+76;
-- 4
SELECT WINNER, CATEGORY
FROM NobelLaureateWinners;
-- 5
SELECT WINNER
FROM NobelLaureateWinners
WHERE YEAR = 1987 AND SUBJECT = 'Chemistry';
-- 6
SELECT SUBJECT, CATEGORY
FROM NobelLaureateWinners
WHERE WINNER = 'Paul Samuelson';
-- 7
SELECT WINNER
FROM NobelLaureateWinners
WHERE YEAR<2000 AND CATEGORY = 'Linguist';
-- 8
SELECT *
FROM NobelLaureateWinners
WHERE (SUBJECT = 'Economics' OR SUBJECT = 'Economics') AND YEAR>=1971 AND YEAR<=1990;
-- 9
SELECT *
FROM NobelLaureateWinners
WHERE WINNER LIKE '%er%';
Get Answers For Free
Most questions answered within 1 hours.