Retrieve Data From Tables
Retrieve Data From Tables
1. Write a SQL statement to display all the information of all salesmen. Go to
the editor
4. Write a query to display the sum of two numbers 10 and 15 from RDMS
sever. Go to the editor
Click me to see the solution with pictorial presentation
7. Write a query to display the columns in a specific order like order date,
salesman id, order number and purchase amount from for all the orders. Go
to the editor
Sample table: orders
Click me to see the solution with pictorial presentation
8. Write a query which will retrieve the value of salesman id of all salesmen,
getting orders from the customers in orders table without any repeats. Go to
the editor
9. Write a SQL statement to display names and city of salesman, who belongs
to the city of Paris. Go to the editor
10. Write a SQL statement to display all the information for those customers
with a grade of 200. Go to the editor
11. Write a SQL query to display the order number followed by order date and
the purchase amount for each order which will be delivered by the salesman
who is holding the ID 5001. Go to the editor
12. Write a SQL query to display the Nobel prizes for 1970. Go to the editor
13. Write a SQL query to know the winner of the 1971 prize for Literature. Go
to the editor
14. Write a SQL query to display the year and subject that won 'Dennis Gabor'
his prize. Go to the editor
15. Write a SQL query to give the name of the 'Physics' winners since the year
1950. Go to the editor
16. Write a SQL query to Show all the details (year, subject, winner, country )
of the Chemistry prize winners between the year 1965 to 1975 inclusive. Go
to the editor
17. Write a SQL query to show all details of the Prime Ministerial winners after
1972 of Menachem Begin and Yitzhak Rabin. Go to the editor
18. Write a SQL query to show all the details of the winners with first name
Louis. Go to the editor
19. Write a SQL query to show all the winners in Physics for 1970 together
with the winner of Economics for 1971. Go to the editor
20. Write a SQL query to show all the winners of nobel prize in the year 1970
except the subject Physiology and Economics. Go to the editor
22. Write a SQL query to find all details of the prize won by Johannes Georg
Bednorz. Go to the editor
23. Write a SQL query to find all the details of the nobel winners for the
subject not started with the letter 'P' and arranged the list as the most recent
comes first, then by name in order. Go to the editor
24. Write a SQL query to find all the details of 1970 winners by the ordered to
subject and winner name; but the list contain the subject Economics and
Chemistry at last. Go to the editor
25. Write a SQL query to find all the products with a price between Rs.200
and Rs.600. Go to the editor
26. Write a SQL query to calculate the average price of all products of the
manufacturer which code is 16. Go to the editor
27. Write a SQL query to find the item name and price in Rs. Go to the
editor
Sample table: item_mast
28. Write a SQL query to display the name and price of all the items with a
price is equal or more than Rs.250, and the list contain the larger price first
and then by name in ascending order. Go to the editor
29. Write a SQL query to display the average price of the items for each
company, showing only the company code. Go to the editor
30. Write a SQL query to find the name and price of the cheapest item(s). Go
to the editor
31. Write a query in SQL to find the last name of all employees, without
duplicates. Go to the editor
32. Write a query in SQL to find the data of employees whose last name is
'Snares'. Go to the editor
Sample table: emp_details
33. Write a query in SQL to display all the data of employees that work in the
department 57. Go to the editor