Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write SQL Query to display the list of all shipments that originated in Egypt.
- *
- SELECT *
- FROM shipments
- WHERE origin = 'Egypt';
- Write SQL Query to display the items that are from the USA.
- *
- SELECT *
- FROM items
- WHERE country_of_origin = 'USA';
- Write SQL Query to display were born after 1970s.
- *
- SELECT *
- FROM individuals
- WHERE birthdate > '1979-12-31';
- Write SQL Query to display the list of captains that are Generation X.
- SELECT *
- FROM captains
- WHERE birthdate BETWEEN '1965-01-01' AND '1980-12-31';
- Write SQL Query to display the maximum miles reach (7500).
- SELECT *
- FROM records
- WHERE miles_reached = 7500;
- Write SQL Query to display the list of captains from the youngest to the oldest. (Ascending)
- SELECT *
- FROM captains
- ORDER BY birthdate ASC;
- Write SQL Query to display the list of captains from the youngest to the oldest
- SELECT *
- FROM captains
- ORDER BY birthdate ASC;
- Write SQL Query to display highest Captain rank birthday date.
- SELECT birthdate
- FROM captains
- ORDER BY rank DESC
- LIMIT 1;
- Write SQL Query to find second highest salary of Captain?(land to shore activity).
- SELECT MAX(salary) AS second_highest_salary
- FROM captains
- WHERE activity = 'land to shore'
- AND salary < (
- SELECT MAX(salary)
- FROM captains
- WHERE activity = 'land to shore'
- );
- Write SQL Query to display the list of the manufacturers of all ships with a capacity of 67200lbs pounds or more.
- SELECT manufacturer
- FROM ships
- WHERE capacity >= 67200;
Advertisement
Add Comment
Please, Sign In to add comment