SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT SUBSTRING(seat_no, 1, LENGTH(seat_no) - 1) AS row, JSON_AGG(SUBSTRING(seat_no, LENGTH(seat_no)) ORDER BY SUBSTRING(seat_no, LENGTH(seat_no))) AS seats, fare_conditions FROM seats WHERE aircraft_code = '773' GROUP BY (seats.seat_no,seats.fare_conditions)

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear