Can't figure out how to calculate the departures, which follow each other with an interval of not less than 5 minutes?

There is a table of flight from which to choose, the number of flights, which follow EACH other with an interval of not less than 5 minutes. The airport of departure departure_airport should be equal to the SVO.
5e973fa85aebd927944074.png
5e973fb0eb727790389532.png
I don't understand how you can use the string comparing them with other strings, to the time of departure differed for at least 5 minutes?
April 19th 20 at 12:11
2 answers
April 19th 20 at 12:13
The window function.
April 19th 20 at 12:15

Find more questions by tags SQLPostgreSQL