SELECT row,json_agg(seat_no ORDER BY seat_no) AS seats,fare_conditions
FROM seat_map
WHERE aircraft_model = 'Boeing 777-300'
GROUP BY row, fare_conditions
ORDER BY row
;
select * from query_cost('SELECT row,json_agg(seat_no ORDER BY seat_no) AS seats,fare_conditions
FROM seat_map
WHERE aircraft_model = ''Boeing 777-300''
GROUP BY row, fare_conditions
ORDER BY row
');