Table transformation

Hi i have a doubt. Why use +1 in this case?

SELECT origin, id,
(SELECT COUNT(*)
FROM flights f
WHERE f.id < flights.id
AND f.origin=flights.origin) + 1
AS flight_sequence_number
FROM flights;

This post was flagged by the community and is temporarily hidden.

Hey, that’ s not my problem. I just would like to know the meaning of the +1. I took this example from the curse Table Transformation.

Thanks, Offline

This post was flagged by the community and is temporarily hidden.

This post was flagged by the community and is temporarily hidden.

Thanks, i already searched about this. But i can’t find a believable answer.

This post was flagged by the community and is temporarily hidden.

This post was flagged by the community and is temporarily hidden.

Yea, i can pass very easily the level. My problem is that they put there this example with this part " +1" and they don’t even explain it. I just would like know why i should use it or not.

How can it’s may be
flights.id < flights.id ?
it’s look wrong!

Hy bytemaster90052, i just got the course example. I thought the same about being or not being wrong. But i’ve the feeling that this statement is related about the order of execution.