w3resource

SQL Exercises: Names of Physics winners since 1950


15. Physics Winners Since 1950

From the following table, write a SQL query to find the Nobel Prize winners in the field of ‘Physics’ since 1950. Return winner.

Sample table: nobel_win

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
.....
1994 Literature                Kenzaburo Oe                                  Japan                  Linguist

View the table

Sample Solution :

-- This query selects the 'winner' column from the 'nobel_win' table.
SELECT winner
-- Specifies the table from which to retrieve the data (in this case, 'nobel_win').
FROM nobel_win
-- Filters the rows to only include those where the 'year' column has a value greater than or equal to 1950
-- and the 'subject' column has the value 'Physics'.
WHERE year >= 1950
  AND subject = 'Physics';

Output of the Query:

winner
Hannes Alfven
Louis Neel
Dennis Gabor
Johannes Georg Bednorz

Code Explaination:

The said SQL query retrieves the winner column from the nobel_win table, where the year of the award is greater than or equal to 1950 and the subject is "Physics". It will return all the rows that match these criteria, resulting in a list of winners of the Nobel Prize in Physics after 1950.

Relational Algebra Expression:

Relational Algebra Expression: Filter the name of the 'Physics' winners since the year 1950.


Relational Algebra Tree:

Relational Algebra Tree: Filter the name of the 'Physics' winners since the year 1950.


Go to:


PREV : Locate Dennis Gabor.
NEXT : Chemistry Winners (1965-1975).


Practice Online



For more Practice: Solve these Related Problems:

  • Write a SQL query to find Nobel Prize winners in "Chemistry" since 1950.
  • Write a SQL query to retrieve Nobel Prize winners in "Medicine" since 1950.
  • Write a SQL query to list Nobel Prize winners in "Literature" since 1950.
  • Write a SQL query to identify Nobel Prize winners in "Peace" since 1950.


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.