SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select s.seat_no, (substring(s.seat_no from 0 for 3)) as rows_count, trim( both 'QWERTYUIOPLKJHGFDSAZXCVBNM' from s.seat_no) as n, count(s.*) as seats_count from seats s inner join aircrafts_data a on a.aircraft_code = s.aircraft_code and a.model->>'en' = 'Boeing 777-300' group by s.seat_no order by (substring(s.seat_no from 0 for 3)) desc

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear