CREATE TABLE month (month_number NUMBER, month_name CLOB)
CREATE TABLE flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE fare (fare_id NUMBER, from_airport VARCHAR2, to_airport VARCHAR2, fare_basis_code CLOB, fare_airline CLOB, restriction_code CLOB, one_direction_cost NUMBER, round_trip_cost NUMBER, round_trip_required VARCHAR2)
CREATE TABLE airport (airport_code VARCHAR2, airport_name CLOB, airport_location CLOB, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2, minimum_connect_time NUMBER)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
CREATE TABLE dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE flight (aircraft_code_sequence CLOB, airline_code VARCHAR2, airline_flight CLOB, arrival_time NUMBER, connections NUMBER, departure_time NUMBER, dual_carrier CLOB, flight_days CLOB, flight_id NUMBER, flight_number NUMBER, from_airport VARCHAR2, meal_code CLOB, stops NUMBER, time_elapsed NUMBER, to_airport VARCHAR2)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note CLOB)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
CREATE TABLE flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE restriction (restriction_code CLOB, advance_purchase NUMBER, stopovers CLOB, saturday_stay_required CLOB, minimum_stay NUMBER, maximum_stay NUMBER, application CLOB, no_discounts CLOB)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
CREATE TABLE fare_basis (fare_basis_code CLOB, booking_class CLOB, class_type CLOB, premium CLOB, economy CLOB, discounted CLOB, night CLOB, season CLOB, basis_days CLOB)
CREATE TABLE flight_stop (flight_id NUMBER, stop_number NUMBER, stop_days CLOB, stop_airport CLOB, arrival_time NUMBER, arrival_airline CLOB, arrival_flight_number NUMBER, departure_time NUMBER, departure_airline CLOB, departure_flight_number NUMBER, stop_time NUMBER)
CREATE TABLE airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE aircraft (aircraft_code VARCHAR2, aircraft_description VARCHAR2, manufacturer VARCHAR2, basic_type VARCHAR2, engines NUMBER, propulsion VARCHAR2, wide_body VARCHAR2, wing_span NUMBER, length NUMBER, weight NUMBER, capacity NUMBER, pay_load NUMBER, cruising_speed NUMBER, range_miles NUMBER, pressurized VARCHAR2)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type VARCHAR2)
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE days (days_code VARCHAR2, day_name VARCHAR2)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)

show me weekday flights from MILWAUKEE to ORLANDO one way
SELECT DISTINCT flight_id FROM flight WHERE (((((((flight_days IN (SELECT DAYSalias6.days_code FROM days AS DAYSalias6 WHERE DAYSalias6.day_name = 'THURSDAY') AND flight_id IN (SELECT FLIGHT_FAREalias3.flight_id FROM flight_fare AS FLIGHT_FAREalias3 WHERE FLIGHT_FAREalias3.fare_id IN (SELECT FAREalias3.fare_id FROM fare AS FAREalias3 WHERE (FAREalias3.fare_basis_code IN (SELECT FARE_BASISalias3.fare_basis_code FROM fare_basis AS FARE_BASISalias3 WHERE FARE_BASISalias3.basis_days IN (SELECT DAYSalias7.days_code FROM days AS DAYSalias7 WHERE DAYSalias7.day_name = 'THURSDAY')) AND FAREalias3.round_trip_required = 'NO')))) OR (flight_days IN (SELECT DAYSalias8.days_code FROM days AS DAYSalias8 WHERE DAYSalias8.day_name = 'FRIDAY') AND flight_id IN (SELECT FLIGHT_FAREalias4.flight_id FROM flight_fare AS FLIGHT_FAREalias4 WHERE FLIGHT_FAREalias4.fare_id IN (SELECT FAREalias4.fare_id FROM fare AS FAREalias4 WHERE (FAREalias4.fare_basis_code IN (SELECT FARE_BASISalias4.fare_basis_code FROM fare_basis AS FARE_BASISalias4 WHERE FARE_BASISalias4.basis_days IN (SELECT DAYSalias9.days_code FROM days AS DAYSalias9 WHERE DAYSalias9.day_name = 'FRIDAY')) AND FAREalias4.round_trip_required = 'NO'))))) OR (flight_days IN (SELECT DAYSalias4.days_code FROM days AS DAYSalias4 WHERE DAYSalias4.day_name = 'WEDNESDAY') AND flight_id IN (SELECT FLIGHT_FAREalias2.flight_id FROM flight_fare AS FLIGHT_FAREalias2 WHERE FLIGHT_FAREalias2.fare_id IN (SELECT FAREalias2.fare_id FROM fare AS FAREalias2 WHERE (FAREalias2.fare_basis_code IN (SELECT FARE_BASISalias2.fare_basis_code FROM fare_basis AS FARE_BASISalias2 WHERE FARE_BASISalias2.basis_days IN (SELECT DAYSalias5.days_code FROM days AS DAYSalias5 WHERE DAYSalias5.day_name = 'WEDNESDAY')) AND FAREalias2.round_trip_required = 'NO'))))) OR (flight_days IN (SELECT DAYSalias2.days_code FROM days AS DAYSalias2 WHERE DAYSalias2.day_name = 'TUESDAY') AND flight_id IN (SELECT FLIGHT_FAREalias1.flight_id FROM flight_fare AS FLIGHT_FAREalias1 WHERE FLIGHT_FAREalias1.fare_id IN (SELECT FAREalias1.fare_id FROM fare AS FAREalias1 WHERE (FAREalias1.fare_basis_code IN (SELECT FARE_BASISalias1.fare_basis_code FROM fare_basis AS FARE_BASISalias1 WHERE FARE_BASISalias1.basis_days IN (SELECT DAYSalias3.days_code FROM days AS DAYSalias3 WHERE DAYSalias3.day_name = 'TUESDAY')) AND FAREalias1.round_trip_required = 'NO'))))) OR (flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name = 'MONDAY') AND flight_id IN (SELECT FLIGHT_FAREalias0.flight_id FROM flight_fare AS FLIGHT_FAREalias0 WHERE FLIGHT_FAREalias0.fare_id IN (SELECT FAREalias0.fare_id FROM fare AS FAREalias0 WHERE (FAREalias0.fare_basis_code IN (SELECT FARE_BASISalias0.fare_basis_code FROM fare_basis AS FARE_BASISalias0 WHERE FARE_BASISalias0.basis_days IN (SELECT DAYSalias1.days_code FROM days AS DAYSalias1 WHERE DAYSalias1.day_name = 'MONDAY')) AND FAREalias0.round_trip_required = 'NO'))))) AND to_airport IN (SELECT AIRPORT_SERVICEalias1.airport_code FROM airport_service AS AIRPORT_SERVICEalias1 WHERE AIRPORT_SERVICEalias1.city_code IN (SELECT CITYalias1.city_code FROM city AS CITYalias1 WHERE CITYalias1.city_name = 'ORLANDO'))) AND from_airport IN (SELECT AIRPORT_SERVICEalias0.airport_code FROM airport_service AS AIRPORT_SERVICEalias0 WHERE AIRPORT_SERVICEalias0.city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'MILWAUKEE')))
WITH "_u_0" AS (SELECT "DAYSalias6"."days_code" FROM "days" "DAYSalias6" WHERE "DAYSalias6"."day_name" = 'THURSDAY' GROUP BY "days_code"), "_u_10" AS (SELECT "DAYSalias4"."days_code" FROM "days" "DAYSalias4" WHERE "DAYSalias4"."day_name" = 'WEDNESDAY' GROUP BY "days_code"), "_u_11" AS (SELECT "DAYSalias5"."days_code" FROM "days" "DAYSalias5" WHERE "DAYSalias5"."day_name" = 'WEDNESDAY' GROUP BY "days_code"), "_u_12" AS (SELECT "FARE_BASISalias2"."fare_basis_code" FROM "fare_basis" "FARE_BASISalias2" LEFT JOIN "_u_11" "_u_11" ON "FARE_BASISalias2"."basis_days" = "_u_11"."" WHERE NOT "_u_11"."" IS NULL GROUP BY "fare_basis_code"), "_u_13" AS (SELECT "FAREalias2"."fare_id" FROM "fare" "FAREalias2" LEFT JOIN "_u_12" "_u_12" ON "FAREalias2"."fare_basis_code" = "_u_12"."" WHERE "FAREalias2"."round_trip_required" = 'NO' AND NOT "_u_12"."" IS NULL GROUP BY "fare_id"), "_u_14" AS (SELECT "FLIGHT_FAREalias2"."flight_id" FROM "flight_fare" "FLIGHT_FAREalias2" LEFT JOIN "_u_13" "_u_13" ON "FLIGHT_FAREalias2"."fare_id" = "_u_13"."" WHERE NOT "_u_13"."" IS NULL GROUP BY "flight_id"), "_u_15" AS (SELECT "DAYSalias2"."days_code" FROM "days" "DAYSalias2" WHERE "DAYSalias2"."day_name" = 'TUESDAY' GROUP BY "days_code"), "_u_16" AS (SELECT "DAYSalias3"."days_code" FROM "days" "DAYSalias3" WHERE "DAYSalias3"."day_name" = 'TUESDAY' GROUP BY "days_code"), "_u_17" AS (SELECT "FARE_BASISalias1"."fare_basis_code" FROM "fare_basis" "FARE_BASISalias1" LEFT JOIN "_u_16" "_u_16" ON "FARE_BASISalias1"."basis_days" = "_u_16"."" WHERE NOT "_u_16"."" IS NULL GROUP BY "fare_basis_code"), "_u_18" AS (SELECT "FAREalias1"."fare_id" FROM "fare" "FAREalias1" LEFT JOIN "_u_17" "_u_17" ON "FAREalias1"."fare_basis_code" = "_u_17"."" WHERE "FAREalias1"."round_trip_required" = 'NO' AND NOT "_u_17"."" IS NULL GROUP BY "fare_id"), "_u_19" AS (SELECT "FLIGHT_FAREalias1"."flight_id" FROM "flight_fare" "FLIGHT_FAREalias1" LEFT JOIN "_u_18" "_u_18" ON "FLIGHT_FAREalias1"."fare_id" = "_u_18"."" WHERE NOT "_u_18"."" IS NULL GROUP BY "flight_id"), "_u_20" AS (SELECT "DAYSalias0"."days_code" FROM "days" "DAYSalias0" WHERE "DAYSalias0"."day_name" = 'MONDAY' GROUP BY "days_code"), "_u_21" AS (SELECT "DAYSalias1"."days_code" FROM "days" "DAYSalias1" WHERE "DAYSalias1"."day_name" = 'MONDAY' GROUP BY "days_code"), "_u_22" AS (SELECT "FARE_BASISalias0"."fare_basis_code" FROM "fare_basis" "FARE_BASISalias0" LEFT JOIN "_u_21" "_u_21" ON "FARE_BASISalias0"."basis_days" = "_u_21"."" WHERE NOT "_u_21"."" IS NULL GROUP BY "fare_basis_code"), "_u_23" AS (SELECT "FAREalias0"."fare_id" FROM "fare" "FAREalias0" LEFT JOIN "_u_22" "_u_22" ON "FAREalias0"."fare_basis_code" = "_u_22"."" WHERE "FAREalias0"."round_trip_required" = 'NO' AND NOT "_u_22"."" IS NULL GROUP BY "fare_id"), "_u_24" AS (SELECT "FLIGHT_FAREalias0"."flight_id" FROM "flight_fare" "FLIGHT_FAREalias0" LEFT JOIN "_u_23" "_u_23" ON "FLIGHT_FAREalias0"."fare_id" = "_u_23"."" WHERE NOT "_u_23"."" IS NULL GROUP BY "flight_id"), "_u_25" AS (SELECT "CITYalias1"."city_code" FROM "city" "CITYalias1" WHERE "CITYalias1"."city_name" = 'ORLANDO' GROUP BY "city_code"), "_u_26" AS (SELECT "AIRPORT_SERVICEalias1"."airport_code" FROM "airport_service" "AIRPORT_SERVICEalias1" LEFT JOIN "_u_25" "_u_25" ON "AIRPORT_SERVICEalias1"."city_code" = "_u_25"."" WHERE NOT "_u_25"."" IS NULL GROUP BY "airport_code"), "_u_27" AS (SELECT "CITYalias0"."city_code" FROM "city" "CITYalias0" WHERE "CITYalias0"."city_name" = 'MILWAUKEE' GROUP BY "city_code"), "_u_28" AS (SELECT "AIRPORT_SERVICEalias0"."airport_code" FROM "airport_service" "AIRPORT_SERVICEalias0" LEFT JOIN "_u_27" "_u_27" ON "AIRPORT_SERVICEalias0"."city_code" = "_u_27"."" WHERE NOT "_u_27"."" IS NULL GROUP BY "airport_code"), "_u_1" AS (SELECT "DAYSalias7"."days_code" FROM "days" "DAYSalias7" WHERE "DAYSalias7"."day_name" = 'THURSDAY' GROUP BY "days_code"), "_u_2" AS (SELECT "FARE_BASISalias3"."fare_basis_code" FROM "fare_basis" "FARE_BASISalias3" LEFT JOIN "_u_1" "_u_1" ON "FARE_BASISalias3"."basis_days" = "_u_1"."" WHERE NOT "_u_1"."" IS NULL GROUP BY "fare_basis_code"), "_u_3" AS (SELECT "FAREalias3"."fare_id" FROM "fare" "FAREalias3" LEFT JOIN "_u_2" "_u_2" ON "FAREalias3"."fare_basis_code" = "_u_2"."" WHERE "FAREalias3"."round_trip_required" = 'NO' AND NOT "_u_2"."" IS NULL GROUP BY "fare_id"), "_u_4" AS (SELECT "FLIGHT_FAREalias3"."flight_id" FROM "flight_fare" "FLIGHT_FAREalias3" LEFT JOIN "_u_3" "_u_3" ON "FLIGHT_FAREalias3"."fare_id" = "_u_3"."" WHERE NOT "_u_3"."" IS NULL GROUP BY "flight_id"), "_u_5" AS (SELECT "DAYSalias8"."days_code" FROM "days" "DAYSalias8" WHERE "DAYSalias8"."day_name" = 'FRIDAY' GROUP BY "days_code"), "_u_6" AS (SELECT "DAYSalias9"."days_code" FROM "days" "DAYSalias9" WHERE "DAYSalias9"."day_name" = 'FRIDAY' GROUP BY "days_code"), "_u_7" AS (SELECT "FARE_BASISalias4"."fare_basis_code" FROM "fare_basis" "FARE_BASISalias4" LEFT JOIN "_u_6" "_u_6" ON "FARE_BASISalias4"."basis_days" = "_u_6"."" WHERE NOT "_u_6"."" IS NULL GROUP BY "fare_basis_code"), "_u_8" AS (SELECT "FAREalias4"."fare_id" FROM "fare" "FAREalias4" LEFT JOIN "_u_7" "_u_7" ON "FAREalias4"."fare_basis_code" = "_u_7"."" WHERE "FAREalias4"."round_trip_required" = 'NO' AND NOT "_u_7"."" IS NULL GROUP BY "fare_id"), "_u_9" AS (SELECT "FLIGHT_FAREalias4"."flight_id" FROM "flight_fare" "FLIGHT_FAREalias4" LEFT JOIN "_u_8" "_u_8" ON "FLIGHT_FAREalias4"."fare_id" = "_u_8"."" WHERE NOT "_u_8"."" IS NULL GROUP BY "flight_id") SELECT DISTINCT "flight_id" FROM "flight" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "flight_days" LEFT JOIN "_u_10" "_u_10" ON "_u_10"."" = "flight_days" LEFT JOIN "_u_14" "_u_14" ON "_u_14"."" = "flight_id" LEFT JOIN "_u_15" "_u_15" ON "_u_15"."" = "flight_days" LEFT JOIN "_u_19" "_u_19" ON "_u_19"."" = "flight_id" LEFT JOIN "_u_20" "_u_20" ON "_u_20"."" = "flight_days" LEFT JOIN "_u_24" "_u_24" ON "_u_24"."" = "flight_id" LEFT JOIN "_u_26" "_u_26" ON "_u_26"."" = "to_airport" LEFT JOIN "_u_28" "_u_28" ON "_u_28"."" = "from_airport" LEFT JOIN "_u_4" "_u_4" ON "_u_4"."" = "flight_id" LEFT JOIN "_u_5" "_u_5" ON "_u_5"."" = "flight_days" LEFT JOIN "_u_9" "_u_9" ON "_u_9"."" = "flight_id" WHERE ((NOT "_u_0"."" IS NULL AND NOT "_u_4"."" IS NULL) OR (NOT "_u_10"."" IS NULL AND NOT "_u_14"."" IS NULL) OR (NOT "_u_15"."" IS NULL AND NOT "_u_19"."" IS NULL) OR (NOT "_u_20"."" IS NULL AND NOT "_u_24"."" IS NULL) OR (NOT "_u_5"."" IS NULL AND NOT "_u_9"."" IS NULL)) AND NOT "_u_26"."" IS NULL AND NOT "_u_28"."" IS NULL