If you, or other seekers are still questioning the logic, I figure that the alias
f, creates a temporary table that is a copy of the
flights table. In this way, it can perform the operations between the original and copy. In this case, the query counts the number of
flight.id integers that are less than
f.id, then add 1, so if there are none less than it, leaving only itself, then it gets Flight Sequence Number “1”.
This is totally open for discussion, so if anyone else has information to add, feel free to do so.
Moreover, I know I was stuck for a while after the instructions said, “For instance, assuming
flight_id increments with each additional flight…”, I was looking at the table schemas searching for it… but I guess it was supposed to be