Advertisement
Dodma

Untitled

May 24th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. SELECT
  2. airports.city,
  3. AVG(SUBQ.total) AS average_flights
  4. FROM
  5. (SELECT
  6. COUNT(arrival_airport) AS total
  7. FROM
  8. flights
  9. INNER JOIN airports ON airports.airport_name = flights.arrival_airport
  10. WHERE
  11. CAST(arrival_time AS date) >= '2018-08-01' AND CAST(arrival_time AS date) <= '2018-08-31'
  12. ) AS SUBQ
  13. GROUP BY
  14. airports.city;
  15.  
  16.  
  17. missing FROM-clause entry for table "airports"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement