Lesson 6/7


SELECT carrier, id,
FROM flights f
WHERE f.id < flights.id
AND f.carrier=flights.carrier) + 1
AS flight_sequence_number
FROM flights;

This is the code from the example they gave us, I don't understand what f is, is it just an alias for flights, and if so whats the point of f.id < flights.id, and what is the point of the +1?


I found


I'm having trouble with the same thing, i don't understand how to code SQL it is kinda weird


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.