I wrote the follow code and was told there is an error in line 1 no such table as “origin” but when i click get code it gave me the same code. I am confuse
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;