Hi all i’m having an issue with this exercise. Instead of just clicking the get code button, i would like to try and figure this one out. In the exercise, they are asking to rename a column to flight_sequence_number however to me it looks like there is already a column named flight_sequence_number. Here is the assignment below.
It would also be interesting to order flights by giving them a sequence number based on time, by carrier.
For instance, assuming flight_id increments with each additional flight, we could use the following query to view flights by carrier, flight id, and sequence number:
SELECT carrier, id,
FROM flights f
WHERE f.id < flights.id
AND f.carrier=flights.carrier) + 1
Using the same pattern, write a query to view flights by origin, flight id, and sequence number. Alias the sequence number column as flight_sequence_number.