'Produce a report of number of flights per day out of each city
Can anyone help with this? the best I could do is this:
SELECT To_char(Flight_day, 'dd-Month-yy') "FLIGHT_DA",
Location_name,
COUNT (FLIGHT_NO) "# of Flights"
From FLIGHT_OCCURRENCE
natural join Flight F
JOIN SERVICE_POINT SP on F.Destination = SP.Location_code
group by Flight_day
GROUPING sets(Flight_day,())
order by Flight_day;
Solution 1:[1]
SELECT To_char(Flight_day, 'DD-MONTH-YY') "FLIGHT_DA",
Location_name,
COUNT (FLIGHT_NO) "# of Flights"
From FLIGHT_OCCURRENCE
natural join Flight F
JOIN SERVICE_POINT SP on F.Destination = SP.Location_code
group by Flight_day, Location_name
order by Flight_day ;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | eNca |
