Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #What was the hottest day? Where was that?
  2.  
  3. SElECT
  4. zip,
  5. max(MaxTemperatureF)
  6. FROM
  7. weather
  8.  
  9. #How many trips started at each station?
  10.  
  11. SELECT
  12. start_station,
  13. Count(*) trip_count
  14. FROM
  15. trips
  16. Group by 1
  17.  
  18. #What's the shortest trip that happened?
  19.  
  20. SELECT
  21. *
  22. FROM
  23. trips
  24. WHERE
  25. duration = 100
  26. LIMIT 1
  27.  
  28. #What is the average trip duration, by end station?
  29.  
  30. SELECT
  31. end_station,
  32. AVG(duration) average_duration
  33. FROM
  34. trips
  35. GROUP by 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement