SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT SUBSTRING(seat_no, 1, LENGTH(seat_no) - 1)::integer 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 row, fare_conditions ORDER BY row; ; select * from query_cost('SELECT SUBSTRING(seat_no, 1, LENGTH(seat_no) - 1)::integer 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 row, fare_conditions ORDER BY row; ');

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear