Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
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 AI support!

Copy Clear