Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Get all restaurants
- SELECT * FROM restaurants;
- 2. Get Italian Restaurants
- SELECT * FROM restaurants
- WHERE cuisine='Italian';
- 3. Get 10 Italian restaurants, subset of fields\q
- SELECT id,name FROM restaurants
- WHERE cuisine='Italian'
- LIMIT 10;
- 4. count of Thai restaurants
- SELECT count(*) from restaurants
- WHERE cuisine = 'Thai';
- 5. count of restaurants
- SELECT count(*) from restaurants;
- 6. Count of Thai restaurants in zip code
Add Comment
Please, Sign In to add comment