I need to expand on the first query by counting the number of flights from the citys in
my airline database and so far have come up with the second query;
The tables in the database are flight, and city.
flight columns:number, origincityid,destinationcityid,departure,duration and stops
city columns:id and name
SELECT city.name, flight.origincityid FROM city
LEFT JOIN flight ON city.id=origincityid
SELECT city.name, COUNT(flight.id) AS numflight
->FROM city LEFT JOIN flight ON origincityid=origincityid.id
->GROUP BY destinationcityid;