Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --First Exercise
- SELECT maxtemperaturef, city
- FROM weather, stations
- GROUP BY maxtemperaturef, city
- ORDER BY maxtemperaturef DESC;
- --Second Exercise
- SELECT start_station,
- COUNT(*) as trips_count
- FROM trips
- GROUP BY start_station;
- --Third Exercise
- SELECT trip_id, duration
- FROM trips
- GROUP BY trip_id, duration
- ORDER BY duration ASC;
- --Fourth Exercise
- SELECT end_station,
- AVG(duration) as avg_trip
- FROM trips
- GROUP BY end_station
- ORDER BY end_station;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement