SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select aircraft_code, trim((model->'ru')::text, '"') AS model_ru, trim((model->'en')::text, '"') AS model_en, count(*) flights_count from flights inner join aircrafts_data using(aircraft_code) where (date(actual_departure) between '01-aug-2017'::date and '31-aug-2017'::date or date(actual_arrival) between '01-aug-2017'::date and '31-aug-2017'::date) group by aircraft_code, trim((model->'ru')::text, '"'), trim((model->'en')::text, '"') order by 4 desc

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear