SELECT
airport_name->>'en' AS departure_airport,
json_agg(DISTINCT arrival_airport ORDER BY arrival_airport) AS arrival_airports
FROM
airports_data ad
JOIN flights f ON ad.airport_code = f.departure_airport
GROUP BY
airport_name->>'en'
ORDER BY
departure_airport