CREATE TABLE routes (rid NUMBER, dst_apid NUMBER, dst_ap CLOB, src_apid NUMBER, src_ap CLOB, alid NUMBER, airline CLOB, codeshare CLOB)
CREATE TABLE airports (apid NUMBER, name CLOB, city CLOB, country CLOB, x NUMBER, y NUMBER, elevation NUMBER, iata CLOB, icao CLOB)
CREATE TABLE airlines (alid NUMBER, name CLOB, iata CLOB, icao CLOB, callsign CLOB, country CLOB, active CLOB)

How many cities are there that have more than 3 airports?
SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)
WITH "cte" AS (SELECT 1 AS "_" FROM "airports" GROUP BY "city" HAVING COUNT(*) > 3) SELECT COUNT(*) FROM "cte" "cte"