I am totally lost in the first lesson


#1



Replace this line with your code.


#2

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;


#3

select count(distinct id) from flights;

Here, they're asking us to count those flights which are representing the flights table, which means we need to give a count of different flights. Hope this helps.


#4

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