Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- What was the hottest day in our data set? Where was that?
- -- select
- -- *
- -- from
- -- weather
- -- where
- -- maxtemperaturef =(
- -- select
- -- MAX (maxtemperaturef)
- -- from
- -- weather
- -- );
- -----------------------------------------------------------------
- -- select
- -- MAX (maxtemperaturef),zip
- -- from
- -- weather
- -- group by
- -- zip
- --How many trips started at each station?
- -- select
- -- count(*), start_terminal
- -- from
- -- trips
- -- group by
- -- start_terminal
- -----------------------------------------------------
- -- What's the shortest trip that happened?
- -- select
- -- MIN (duration)
- -- from
- -- trips
- ------------------------------------------------------
- -- What is the average trip duration, by end station?
- -- select
- -- end_terminal, avg (duration) as avg_duration
- -- from
- -- trips
- -- group by 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement