Guest User

Untitled

a guest
Oct 16th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. 1. Get all restaurants
  2. SELECT * FROM restaurants;
  3.  
  4. 2. Get Italian Restaurants
  5. SELECT * FROM restaurants
  6. WHERE cuisine='Italian';
  7.  
  8. 3. Get 10 Italian restaurants, subset of fields\q
  9. SELECT id,name FROM restaurants
  10. WHERE cuisine='Italian'
  11. LIMIT 10;
  12.  
  13. 4. count of Thai restaurants
  14. SELECT count(*) from restaurants
  15. WHERE cuisine = 'Thai';
  16.  
  17. 5. count of restaurants
  18. SELECT count(*) from restaurants;
  19.  
  20. 6. Count of Thai restaurants in zip code
Add Comment
Please, Sign In to add comment