Advertisement
Guest User

President

a guest
Apr 9th, 2020
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.79 KB | None | 0 0
  1. select CONCAT( NOW(), " Elijah Shope" );
  2.  
  3. select * from president;
  4.  
  5.  
  6. select round(PI()*15*15, 2);
  7.  
  8.  
  9. select last_name, first_name, state from president order by last_name limit 20;
  10.  
  11. select last_name, first_name, state from president order by state DESC, last_name;
  12.  
  13. select last_name, first_name, birth from president where birth < "1750-01-01";
  14.  
  15.  
  16. select last_name, first_name, birth, death, to_days(death) - to_days(birth) from president;
  17.  
  18. select last_name, first_name, birth, death, (to_days(death) - to_days(birth))/365 from president;
  19.  
  20. select last_name, first_name, birth, death, round((to_days(death) - to_days(birth))/365) from president;
  21.  
  22.  
  23. select last_name, first_name, birth, death, round((to_days(death) - to_days(birth))/365) from president order by to_days(death) - to_days(birth);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement