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 COUNT(DISTINCT SUBSTRING(seats.seat_no FROM '^[0-9]+')) AS rows_count, COUNT(seats.aircraft_code) AS seats_count FROM aircrafts_data JOIN seats USING (aircraft_code) WHERE aircrafts_data.model->>'en' = 'Boeing 777-300'; GROUP BY seats.aircraft_code

Stuck with a problem? Got Error? Ask AI support!

Copy Clear