schema
stringlengths 29
5.42k
| question
stringlengths 0
752
| rejected
stringlengths 2
4.44k
| chosen
stringlengths 4
8.94k
| weight
float64 0
8.73
|
---|---|---|---|---|
CREATE TABLE table_name_49 (Id VARCHAR2)
| What 2009 has 18.5% as the 2007? | SELECT 2009 FROM table_name_49 WHERE 2007 = "18.5%" | SELECT 2009 FROM "table_name_49" WHERE "18.5%" = 2007 | 0.051758 |
CREATE TABLE table_62687 ("Seat" FLOAT, "Series 1" CLOB, "Series 2" CLOB, "Series 3" CLOB, "Series 4" CLOB)
| What shows for series 4 when the seat shows 1? | SELECT "Series 4" FROM table_62687 WHERE "Seat" = '1' | SELECT "Series 4" FROM "table_62687" WHERE "Seat" = '1' | 0.053711 |
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note CLOB)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
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 flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
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 dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE days (days_code VARCHAR2, day_name VARCHAR2)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
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 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 food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
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 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 compartment_class (compartment VARCHAR2, class_type VARCHAR2)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
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)
| what 's the smallest plane that flies from PITTSBURGH to BALTIMORE on eight 16 | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, equipment_sequence, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 16 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND aircraft.capacity = (SELECT MIN(AIRCRAFTalias1.capacity) FROM aircraft AS AIRCRAFTalias1, airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, equipment_sequence AS EQUIPMENT_SEQUENCEalias1, flight AS FLIGHTalias1 WHERE (CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'BALTIMORE' AND DATE_DAYalias1.day_number = 16 AND DATE_DAYalias1.month_number = 8 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'PITTSBURGH' AND EQUIPMENT_SEQUENCEalias1.aircraft_code = AIRCRAFTalias1.aircraft_code AND FLIGHTalias1.aircraft_code_sequence = EQUIPMENT_SEQUENCEalias1.aircraft_code_sequence AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | WITH "_u_0" AS (SELECT MIN("AIRCRAFTalias1"."capacity") FROM "aircraft" "AIRCRAFTalias1" JOIN "date_day" "DATE_DAYalias1" ON "DATE_DAYalias1"."day_number" = 16 AND "DATE_DAYalias1"."month_number" = 8 AND "DATE_DAYalias1"."year" = 1991 JOIN "days" "DAYSalias1" ON "DATE_DAYalias1"."day_name" = "DAYSalias1"."day_name" JOIN "equipment_sequence" "EQUIPMENT_SEQUENCEalias1" ON "AIRCRAFTalias1"."aircraft_code" = "EQUIPMENT_SEQUENCEalias1"."aircraft_code" JOIN "flight" "FLIGHTalias1" ON "DAYSalias1"."days_code" = "FLIGHTalias1"."flight_days" AND "EQUIPMENT_SEQUENCEalias1"."aircraft_code_sequence" = "FLIGHTalias1"."aircraft_code_sequence" JOIN "airport_service" "AIRPORT_SERVICEalias2" ON "AIRPORT_SERVICEalias2"."airport_code" = "FLIGHTalias1"."from_airport" JOIN "airport_service" "AIRPORT_SERVICEalias3" ON "AIRPORT_SERVICEalias3"."airport_code" = "FLIGHTalias1"."to_airport" JOIN "city" "CITYalias2" ON "AIRPORT_SERVICEalias2"."city_code" = "CITYalias2"."city_code" AND "CITYalias2"."city_name" = 'PITTSBURGH' JOIN "city" "CITYalias3" ON "AIRPORT_SERVICEalias3"."city_code" = "CITYalias3"."city_code" AND "CITYalias3"."city_name" = 'BALTIMORE') SELECT DISTINCT "aircraft"."aircraft_code" FROM "aircraft" JOIN "date_day" ON "date_day"."day_number" = 16 AND "date_day"."month_number" = 8 AND "date_day"."year" = 1991 JOIN "_u_0" "_u_0" ON "_u_0"."" = "aircraft"."capacity" JOIN "days" ON "date_day"."day_name" = "days"."day_name" JOIN "equipment_sequence" ON "aircraft"."aircraft_code" = "equipment_sequence"."aircraft_code" JOIN "flight" ON "days"."days_code" = "flight"."flight_days" AND "equipment_sequence"."aircraft_code_sequence" = "flight"."aircraft_code_sequence" JOIN "airport_service" "AIRPORT_SERVICE_0" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'PITTSBURGH' JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'BALTIMORE' | 2.070313 |
CREATE TABLE table_38743 ("Institution" CLOB, "Location" CLOB, "Established" FLOAT, "Gained university status" FLOAT, "Vice-chancellor" CLOB, "Total Number of Students" FLOAT, "Research Funding ( \\u00a3 , 000 ) " FLOAT)
| Which institution has more than 19,020 students in london with a research funding of more than 7,734? | SELECT "Institution" FROM table_38743 WHERE "Total Number of Students" > '19,020' AND "Location" = 'london' AND "Research Funding (\u00a3,000)" > '7,734' | SELECT "Institution" FROM "table_38743" WHERE "Location" = 'london' AND "Research Funding (\u00a3,000)" > '7,734' AND "Total Number of Students" > '19,020' | 0.151367 |
CREATE TABLE table_name_2 (mountains_classification VARCHAR2, winner VARCHAR2)
| What is the Mountains Classification for Winner jos luis carrasco? | SELECT mountains_classification FROM table_name_2 WHERE winner = "josé luis carrasco" | SELECT "mountains_classification" FROM "table_name_2" WHERE "josé luis carrasco" = "winner" | 0.088867 |
CREATE TABLE Catalogs (catalog_id NUMBER, catalog_name VARCHAR2, catalog_publisher VARCHAR2, date_of_publication DATETIME, date_of_latest_revision DATETIME)
CREATE TABLE Catalog_Contents (catalog_entry_id NUMBER, catalog_level_number NUMBER, parent_entry_id NUMBER, previous_entry_id NUMBER, next_entry_id NUMBER, catalog_entry_name VARCHAR2, product_stock_number VARCHAR2, price_in_dollars DOUBLE PRECISION, price_in_euros DOUBLE PRECISION, price_in_pounds DOUBLE PRECISION, capacity VARCHAR2, length VARCHAR2, height VARCHAR2, width VARCHAR2)
CREATE TABLE Attribute_Definitions (attribute_id NUMBER, attribute_name VARCHAR2, attribute_data_type VARCHAR2)
CREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id NUMBER, catalog_level_number NUMBER, attribute_id NUMBER, attribute_value VARCHAR2)
CREATE TABLE Catalog_Structure (catalog_level_number NUMBER, catalog_id NUMBER, catalog_level_name VARCHAR2)
| A bar chart for what are the number of the names of catalog entries with level number 8?, I want to sort by the names in ascending. | SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY catalog_entry_name | SELECT "catalog_entry_name", COUNT("catalog_entry_name") FROM "Catalog_Contents" "t1" JOIN "Catalog_Contents_Additional_Attributes" "t2" ON "8" = "t2"."catalog_level_number" AND "t1"."catalog_entry_id" = "t2"."catalog_entry_id" GROUP BY "catalog_entry_name" ORDER BY "catalog_entry_name" | 0.280273 |
CREATE TABLE table_203_131 (id NUMBER, "pos." NUMBER, "car #" NUMBER, "driver" CLOB, "make" CLOB, "team" CLOB)
| who was the first driver to finish ? | SELECT "driver" FROM table_203_131 WHERE "pos." = 1 | SELECT "driver" FROM "table_203_131" WHERE "pos." = 1 | 0.051758 |
CREATE TABLE table_204_263 (id NUMBER, "pick" NUMBER, "player" CLOB, "country of origin" CLOB, "pba team" CLOB, "college" CLOB)
| which players are not part of the united states ? | SELECT "player" FROM table_204_263 WHERE "country of origin" <> 'united states' | SELECT "player" FROM "table_204_263" WHERE "country of origin" <> 'united states' | 0.079102 |
CREATE TABLE table_name_83 (league_cup_apps VARCHAR2, fa_cup_apps VARCHAR2)
| Which league cup apps has FA as the cup apps of 5? | SELECT league_cup_apps FROM table_name_83 WHERE fa_cup_apps = "5" | SELECT "league_cup_apps" FROM "table_name_83" WHERE "5" = "fa_cup_apps" | 0.069336 |
CREATE TABLE table_name_86 (set_3 VARCHAR2, time VARCHAR2, score VARCHAR2, set_2 VARCHAR2)
| Which Set 3 has a Score of 3 2, and a Set 2 of 25 23, and a Time of 19:00? | SELECT set_3 FROM table_name_86 WHERE score = "3–2" AND set_2 = "25–23" AND time = "19:00" | SELECT "set_3" FROM "table_name_86" WHERE "19:00" = "time" AND "25–23" = "set_2" AND "3–2" = "score" | 0.097656 |
CREATE TABLE table_name_33 (lineup VARCHAR2, match VARCHAR2)
| What was her place in the lineup on match 2? | SELECT lineup FROM table_name_33 WHERE match = "2" | SELECT "lineup" FROM "table_name_33" WHERE "2" = "match" | 0.054688 |
CREATE TABLE table_name_74 (week_2 VARCHAR2, week_3 VARCHAR2)
| Which week 2 had a week 3 of Cidney Carson? | SELECT week_2 FROM table_name_74 WHERE week_3 = "cidney carson" | SELECT "week_2" FROM "table_name_74" WHERE "cidney carson" = "week_3" | 0.067383 |
CREATE TABLE table_name_21 (run_2 NUMBER, run_1 VARCHAR2, athlete VARCHAR2)
| What was john farrow's run 2 associated with a run 1 of greater than 52.25? | SELECT MAX(run_2) FROM table_name_21 WHERE run_1 > 52.25 AND athlete = "john farrow" | SELECT MAX("run_2") FROM "table_name_21" WHERE "athlete" = "john farrow" AND "run_1" > 52.25 | 0.089844 |
CREATE TABLE dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type 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 airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE days (days_code VARCHAR2, day_name VARCHAR2)
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note 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 code_description (code VARCHAR2, description 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 flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
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 city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
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 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 class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name 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)
| give me the earliest flight tomorrow on UA from ST. PETERSBURG to MILWAUKEE | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAUKEE' AND date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ST. PETERSBURG' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'UA') AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, flight AS FLIGHTalias1 WHERE ((CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'MILWAUKEE' AND DATE_DAYalias1.day_number = 20 AND DATE_DAYalias1.month_number = 1 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'ST. PETERSBURG' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND FLIGHTalias1.airline_code = 'UA') | WITH "_u_0" AS (SELECT MIN("FLIGHTalias1"."departure_time") FROM "airport_service" "AIRPORT_SERVICEalias2" JOIN "date_day" "DATE_DAYalias1" ON "DATE_DAYalias1"."day_number" = 20 AND "DATE_DAYalias1"."month_number" = 1 AND "DATE_DAYalias1"."year" = 1991 JOIN "city" "CITYalias2" ON "AIRPORT_SERVICEalias2"."city_code" = "CITYalias2"."city_code" AND "CITYalias2"."city_name" = 'ST. PETERSBURG' JOIN "days" "DAYSalias1" ON "DATE_DAYalias1"."day_name" = "DAYSalias1"."day_name" JOIN "flight" "FLIGHTalias1" ON "AIRPORT_SERVICEalias2"."airport_code" = "FLIGHTalias1"."from_airport" AND "DAYSalias1"."days_code" = "FLIGHTalias1"."flight_days" AND "FLIGHTalias1"."airline_code" = 'UA' JOIN "airport_service" "AIRPORT_SERVICEalias3" ON "AIRPORT_SERVICEalias3"."airport_code" = "FLIGHTalias1"."to_airport" JOIN "city" "CITYalias3" ON "AIRPORT_SERVICEalias3"."city_code" = "CITYalias3"."city_code" AND "CITYalias3"."city_name" = 'MILWAUKEE') SELECT DISTINCT "flight"."flight_id" FROM "airport_service" "AIRPORT_SERVICE_0" JOIN "date_day" ON "date_day"."day_number" = 20 AND "date_day"."month_number" = 1 AND "date_day"."year" = 1991 JOIN "city" "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'ST. PETERSBURG' JOIN "days" ON "date_day"."day_name" = "days"."day_name" JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" AND "days"."days_code" = "flight"."flight_days" AND "flight"."airline_code" = 'UA' JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "_u_0" "_u_0" ON "_u_0"."" = "flight"."departure_time" JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'MILWAUKEE' | 1.705078 |
CREATE TABLE HOST (Name VARCHAR2, Host_ID VARCHAR2)
CREATE TABLE party (Party_ID VARCHAR2, Number_of_hosts NUMBER)
CREATE TABLE party_host (Host_ID VARCHAR2, Party_ID VARCHAR2)
| Show the host names for parties with number of hosts greater than 20. | SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 | SELECT "T2"."Name" FROM "party_host" "T1" JOIN "HOST" "T2" ON "T1"."Host_ID" = "T2"."Host_ID" JOIN "party" "T3" ON "T1"."Party_ID" = "T3"."Party_ID" AND "T3"."Number_of_hosts" > 20 | 0.175781 |
CREATE TABLE Department_Store_Chain (dept_store_chain_id NUMBER, dept_store_chain_name VARCHAR2)
CREATE TABLE Customer_Addresses (customer_id NUMBER, address_id NUMBER, date_from DATETIME, date_to DATETIME)
CREATE TABLE Staff_Department_Assignments (staff_id NUMBER, department_id NUMBER, date_assigned_from DATETIME, job_title_code VARCHAR2, date_assigned_to DATETIME)
CREATE TABLE Customers (customer_id NUMBER, payment_method_code VARCHAR2, customer_code VARCHAR2, customer_name VARCHAR2, customer_address VARCHAR2, customer_phone VARCHAR2, customer_email VARCHAR2)
CREATE TABLE Department_Stores (dept_store_id NUMBER, dept_store_chain_id NUMBER, store_name VARCHAR2, store_address VARCHAR2, store_phone VARCHAR2, store_email VARCHAR2)
CREATE TABLE Product_Suppliers (product_id NUMBER, supplier_id NUMBER, date_supplied_from DATETIME, date_supplied_to DATETIME, total_amount_purchased VARCHAR2, total_value_purchased NUMBER)
CREATE TABLE Staff (staff_id NUMBER, staff_gender VARCHAR2, staff_name VARCHAR2)
CREATE TABLE Addresses (address_id NUMBER, address_details VARCHAR2)
CREATE TABLE Customer_Orders (order_id NUMBER, customer_id NUMBER, order_status_code VARCHAR2, order_date DATETIME)
CREATE TABLE Supplier_Addresses (supplier_id NUMBER, address_id NUMBER, date_from DATETIME, date_to DATETIME)
CREATE TABLE Order_Items (order_item_id NUMBER, order_id NUMBER, product_id NUMBER)
CREATE TABLE Departments (department_id NUMBER, dept_store_id NUMBER, department_name VARCHAR2)
CREATE TABLE Products (product_id NUMBER, product_type_code VARCHAR2, product_name VARCHAR2, product_price NUMBER)
CREATE TABLE Suppliers (supplier_id NUMBER, supplier_name VARCHAR2, supplier_phone VARCHAR2)
| what is the average price for each type of product?, and order y axis from low to high order. | SELECT product_type_code, AVG(product_price) FROM Products GROUP BY product_type_code ORDER BY AVG(product_price) | SELECT "product_type_code", AVG("product_price") FROM "Products" GROUP BY "product_type_code" ORDER BY AVG("product_price") | 0.120117 |
CREATE TABLE table_name_47 (result VARCHAR2, category VARCHAR2, year VARCHAR2)
| What is the Result with a Category of album of the year in a Year that is 2011? | SELECT result FROM table_name_47 WHERE category = "album of the year" AND year = 2011 | SELECT "result" FROM "table_name_47" WHERE "album of the year" = "category" AND "year" = 2011 | 0.09082 |
CREATE TABLE table_58339 ("Driver" CLOB, "Constructor" CLOB, "Laps" FLOAT, "Time/Retired" CLOB, "Grid" FLOAT)
| What is the average grid for johnny herbert with a Time/Retired of +1 lap? | SELECT AVG("Grid") FROM table_58339 WHERE "Time/Retired" = '+1 lap' AND "Driver" = 'johnny herbert' | SELECT AVG("Grid") FROM "table_58339" WHERE "Driver" = 'johnny herbert' AND "Time/Retired" = '+1 lap' | 0.098633 |
CREATE TABLE table_27339 ("Shirt No" FLOAT, "Nationality" CLOB, "Player" CLOB, "Birth Date" CLOB, "Height" FLOAT, "Position" CLOB)
| Name the birth date for taavi sadam | SELECT "Birth Date" FROM table_27339 WHERE "Player" = 'Taavi Sadam' | SELECT "Birth Date" FROM "table_27339" WHERE "Player" = 'Taavi Sadam' | 0.067383 |
CREATE TABLE table_name_92 (Previous VARCHAR2, nationality VARCHAR2, points VARCHAR2)
| Tell me the previous rank for italy with points more than 100 | SELECT Previous AS rank FROM table_name_92 WHERE nationality = "italy" AND points > 100 | SELECT "Previous" AS "rank" FROM "table_name_92" WHERE "italy" = "nationality" AND "points" > 100 | 0.094727 |
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE transfers (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, eventtype CLOB, careunit CLOB, wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE icustays (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, first_careunit CLOB, last_careunit CLOB, first_wardid NUMBER, last_wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
| what was the last time patient 78086 was prescribed medication? | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 78086) ORDER BY prescriptions.startdate DESC LIMIT 1 | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 78086 GROUP BY "hadm_id") SELECT "prescriptions"."startdate" FROM "prescriptions" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "prescriptions"."hadm_id" WHERE NOT "_u_0"."" IS NULL ORDER BY "prescriptions"."startdate" DESC FETCH FIRST 1 ROWS ONLY | 0.330078 |
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
| List all questions with a particular tag. | SELECT p.Id AS "post_link", t.TagName, p.Title, p.Score FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE TagName = '##Tag##' AND CreationDate > '5/21/2016' ORDER BY p.Score DESC | SELECT "p"."Id" AS "post_link", "t"."TagName", "p"."Title", "p"."Score" FROM "Posts" "p" JOIN "PostTags" "pt" ON "p"."Id" = "pt"."PostId" JOIN "Tags" "t" ON "pt"."TagId" = "t"."Id" WHERE "CreationDate" > '5/21/2016' AND "TagName" = '##Tag##' ORDER BY "p"."Score" DESC | 0.260742 |
CREATE TABLE table_32739 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| What home team played at the western oval? | SELECT "Home team" FROM table_32739 WHERE "Venue" = 'western oval' | SELECT "Home team" FROM "table_32739" WHERE "Venue" = 'western oval' | 0.066406 |
CREATE TABLE table_28215780_4 (original_air_date VARCHAR2, written_by VARCHAR2)
| What are the original air date(s) for episodes written by aron eli coleite? | SELECT original_air_date FROM table_28215780_4 WHERE written_by = "Aron Eli Coleite" | SELECT "original_air_date" FROM "table_28215780_4" WHERE "Aron Eli Coleite" = "written_by" | 0.087891 |
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
| Bug report score by day of week. | SELECT MAX(100 * Score) / 100.0 AS AvgScore, TIME_TO_STR(CreationDate, '%A') AS DayOfWeek, COUNT(Id) AS NumPosts FROM Posts WHERE Tags LIKE '%##Tag##%' GROUP BY TIME_TO_STR(CreationDate, '%A') ORDER BY MAX(100 * Score) / 100.0 DESC | SELECT MAX(100 * "Score") / NULLIF(100.0, 0) AS "AvgScore", TO_CHAR("CreationDate", 'DAY') AS "DayOfWeek", COUNT("Id") AS "NumPosts" FROM "Posts" WHERE "Tags" LIKE '%##Tag##%' GROUP BY TO_CHAR("CreationDate", 'DAY') ORDER BY MAX(100 * "Score") / NULLIF(100.0, 0) DESC | 0.260742 |
CREATE TABLE table_57978 ("Game" FLOAT, "Date" CLOB, "Team" CLOB, "Score" CLOB, "High points" CLOB, "High rebounds" CLOB, "High assists" CLOB, "Location Attendance" CLOB, "Record" CLOB)
| What is the date of game 59? | SELECT "Date" FROM table_57978 WHERE "Game" = '59' | SELECT "Date" FROM "table_57978" WHERE "Game" = '59' | 0.050781 |
CREATE TABLE table_46746 ("Place" CLOB, "Player" CLOB, "Country" CLOB, "Score" CLOB, "To par" CLOB)
| What is the Place of the Player with a To par of +2 and a Score of 70-72-73=215? | SELECT "Place" FROM table_46746 WHERE "To par" = '+2' AND "Score" = '70-72-73=215' | SELECT "Place" FROM "table_46746" WHERE "Score" = '70-72-73=215' AND "To par" = '+2' | 0.082031 |
CREATE TABLE journal (journalid NUMBER, journalname VARCHAR2)
CREATE TABLE paperfield (fieldid NUMBER, paperid NUMBER)
CREATE TABLE field (fieldid NUMBER)
CREATE TABLE keyphrase (keyphraseid NUMBER, keyphrasename VARCHAR2)
CREATE TABLE venue (venueid NUMBER, venuename VARCHAR2)
CREATE TABLE writes (paperid NUMBER, authorid NUMBER)
CREATE TABLE paperdataset (paperid NUMBER, datasetid NUMBER)
CREATE TABLE cite (citingpaperid NUMBER, citedpaperid NUMBER)
CREATE TABLE dataset (datasetid NUMBER, datasetname VARCHAR2)
CREATE TABLE author (authorid NUMBER, authorname VARCHAR2)
CREATE TABLE paperkeyphrase (paperid NUMBER, keyphraseid NUMBER)
CREATE TABLE paper (paperid NUMBER, title VARCHAR2, venueid NUMBER, year NUMBER, numciting NUMBER, numcitedby NUMBER, journalid NUMBER)
| What are keyphrases by Christof Dallermassl in 2000 ? | SELECT DISTINCT paperkeyphrase.keyphraseid FROM author, paper, paperkeyphrase, writes WHERE author.authorname = 'Christof Dallermassl' AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2000 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | SELECT DISTINCT "paperkeyphrase"."keyphraseid" FROM "author" JOIN "writes" ON "author"."authorid" = "writes"."authorid" JOIN "paper" ON "paper"."paperid" = "writes"."paperid" AND "paper"."year" = 2000 JOIN "paperkeyphrase" ON "paper"."paperid" = "paperkeyphrase"."paperid" WHERE "author"."authorname" = 'Christof Dallermassl' | 0.317383 |
CREATE TABLE table_name_12 (grid NUMBER, time_retired VARCHAR2, laps VARCHAR2)
| What is the total grid number where the time/retired is +58.182 and the lap number is less than 67? | SELECT SUM(grid) FROM table_name_12 WHERE time_retired = "+58.182" AND laps < 67 | SELECT SUM("grid") FROM "table_name_12" WHERE "+58.182" = "time_retired" AND "laps" < 67 | 0.085938 |
CREATE TABLE table_2897457_2 (nationality VARCHAR2, position VARCHAR2, nhl_team VARCHAR2)
| What is the nationality of the draft pick player who plays centre position and is going to Calgary Flames? | SELECT nationality FROM table_2897457_2 WHERE position = "Centre" AND nhl_team = "Calgary Flames" | SELECT "nationality" FROM "table_2897457_2" WHERE "Calgary Flames" = "nhl_team" AND "Centre" = "position" | 0.102539 |
CREATE TABLE table_27902171_8 (high_assists VARCHAR2, record VARCHAR2)
| Name the total number of high asists for 34-27 | SELECT COUNT(high_assists) FROM table_27902171_8 WHERE record = "34-27" | SELECT COUNT("high_assists") FROM "table_27902171_8" WHERE "34-27" = "record" | 0.075195 |
CREATE TABLE table_name_83 (batsmen VARCHAR2, wicket VARCHAR2)
| Who were the batsmen paired for wicket 7? | SELECT batsmen FROM table_name_83 WHERE wicket = "7" | SELECT "batsmen" FROM "table_name_83" WHERE "7" = "wicket" | 0.056641 |
CREATE TABLE table_76544 ("Year" FLOAT, "Date" CLOB, "Race name" CLOB, "Winner" CLOB, "Engine" CLOB)
| What date did Ted Horn win Lakewood Race 2? | SELECT "Date" FROM table_76544 WHERE "Winner" = 'ted horn' AND "Race name" = 'lakewood race 2' | SELECT "Date" FROM "table_76544" WHERE "Race name" = 'lakewood race 2' AND "Winner" = 'ted horn' | 0.09375 |
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
| what number of patients born before the year 1837 had lab test item id as 50885? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "1837" AND lab.itemid = "50885" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "50885" = "lab"."itemid" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "1837" > "demographic"."dob_year" | 0.188477 |
CREATE TABLE table_54212 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| What is the date of the game when the away team score is 15.14 (104)? | SELECT "Date" FROM table_54212 WHERE "Away team score" = '15.14 (104)' | SELECT "Date" FROM "table_54212" WHERE "Away team score" = '15.14 (104)' | 0.070313 |
CREATE TABLE table_46333 ("Round" FLOAT, "Pick #" FLOAT, "Player" CLOB, "Position" CLOB, "College" CLOB)
| Name the average Pick # of mike williams? | SELECT AVG("Pick #") FROM table_46333 WHERE "Player" = 'mike williams' | SELECT AVG("Pick #") FROM "table_46333" WHERE "Player" = 'mike williams' | 0.070313 |
CREATE TABLE Financial_Transactions (transaction_id NUMBER, account_id NUMBER, invoice_number NUMBER, transaction_type VARCHAR2, transaction_date DATETIME, transaction_amount NUMBER, transaction_comment VARCHAR2, other_transaction_details VARCHAR2)
CREATE TABLE Invoices (invoice_number NUMBER, order_id NUMBER, invoice_date DATETIME)
CREATE TABLE Product_Categories (production_type_code VARCHAR2, product_type_description VARCHAR2, vat_rating NUMBER)
CREATE TABLE Customers (customer_id NUMBER, customer_first_name VARCHAR2, customer_middle_initial VARCHAR2, customer_last_name VARCHAR2, gender VARCHAR2, email_address VARCHAR2, login_name VARCHAR2, login_password VARCHAR2, phone_number VARCHAR2, town_city VARCHAR2, state_county_province VARCHAR2, country VARCHAR2)
CREATE TABLE Accounts (account_id NUMBER, customer_id NUMBER, date_account_opened DATETIME, account_name VARCHAR2, other_account_details VARCHAR2)
CREATE TABLE Invoice_Line_Items (order_item_id NUMBER, invoice_number NUMBER, product_id NUMBER, product_title VARCHAR2, product_quantity VARCHAR2, product_price NUMBER, derived_product_cost NUMBER, derived_vat_payable NUMBER, derived_total_cost NUMBER)
CREATE TABLE Order_Items (order_item_id NUMBER, order_id NUMBER, product_id NUMBER, product_quantity VARCHAR2, other_order_item_details VARCHAR2)
CREATE TABLE Orders (order_id NUMBER, customer_id NUMBER, date_order_placed DATETIME, order_details VARCHAR2)
CREATE TABLE Products (product_id NUMBER, parent_product_id NUMBER, production_type_code VARCHAR2, unit_price NUMBER, product_name VARCHAR2, product_color VARCHAR2, product_size VARCHAR2)
| Bar chart x axis other account details y axis how many other account details, and list by the Y-axis in desc. | SELECT other_account_details, COUNT(other_account_details) FROM Accounts GROUP BY other_account_details ORDER BY COUNT(other_account_details) DESC | SELECT "other_account_details", COUNT("other_account_details") FROM "Accounts" GROUP BY "other_account_details" ORDER BY COUNT("other_account_details") DESC | 0.152344 |
CREATE TABLE table_17398 ("Metropolitan Area" CLOB, "Media Market Ranking" FLOAT, "Hosted 4 teams since" FLOAT, "NFL Team ( s ) " CLOB, "MLB Team ( s ) " CLOB, "NBA Team ( s ) " CLOB, "NHL Team ( s ) " CLOB)
| How many NHL teams are there in the Phoenix, Arizona area? | SELECT COUNT("NHL Team(s)") FROM table_17398 WHERE "Metropolitan Area" = 'Phoenix, Arizona' | SELECT COUNT("NHL Team(s)") FROM "table_17398" WHERE "Metropolitan Area" = 'Phoenix, Arizona' | 0.09082 |
CREATE TABLE table_name_79 (type VARCHAR2, faith VARCHAR2, name VARCHAR2)
| Faith of , and a Name of greenway has what type? | SELECT type FROM table_name_79 WHERE faith = "–" AND name = "greenway" | SELECT "type" FROM "table_name_79" WHERE "faith" = "–" AND "greenway" = "name" | 0.076172 |
CREATE TABLE table_204_111 (id NUMBER, "name" CLOB, "animal type" CLOB, "introduced" NUMBER, "reintroduced" CLOB, "retired" NUMBER, "beanie baby resembled" CLOB)
| which animal type has the most pillow pals ? | SELECT "animal type" FROM table_204_111 GROUP BY "animal type" ORDER BY COUNT("name") DESC LIMIT 1 | SELECT "animal type" FROM "table_204_111" GROUP BY "animal type" ORDER BY COUNT("name") DESC FETCH FIRST 1 ROWS ONLY | 0.113281 |
CREATE TABLE table_name_31 (against VARCHAR2, venue VARCHAR2)
| Name the Against of Venue of brewery field , bridgend? | SELECT against FROM table_name_31 WHERE venue = "brewery field , bridgend" | SELECT "against" FROM "table_name_31" WHERE "brewery field , bridgend" = "venue" | 0.078125 |
CREATE TABLE table_53141 ("Date" CLOB, "Opponent" CLOB, "Score" CLOB, "Loss" CLOB, "Attendance" FLOAT, "Record" CLOB)
| What was the attendance when the Braves were the opponent and the record was 56-53? | SELECT AVG("Attendance") FROM table_53141 WHERE "Opponent" = 'braves' AND "Record" = '56-53' | SELECT AVG("Attendance") FROM "table_53141" WHERE "Opponent" = 'braves' AND "Record" = '56-53' | 0.091797 |
CREATE TABLE Students (student_id NUMBER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR2, password VARCHAR2, personal_name VARCHAR2, middle_name VARCHAR2, family_name VARCHAR2)
CREATE TABLE Course_Authors_and_Tutors (author_id NUMBER, author_tutor_ATB VARCHAR2, login_name VARCHAR2, password VARCHAR2, personal_name VARCHAR2, middle_name VARCHAR2, family_name VARCHAR2, gender_mf VARCHAR2, address_line_1 VARCHAR2)
CREATE TABLE Courses (course_id NUMBER, author_id NUMBER, subject_id NUMBER, course_name VARCHAR2, course_description VARCHAR2)
CREATE TABLE Student_Tests_Taken (registration_id NUMBER, date_test_taken DATETIME, test_result VARCHAR2)
CREATE TABLE Subjects (subject_id NUMBER, subject_name VARCHAR2)
CREATE TABLE Student_Course_Enrolment (registration_id NUMBER, student_id NUMBER, course_id NUMBER, date_of_enrolment DATETIME, date_of_completion DATETIME)
| Find the number of the the date of enrollment of the 'Spanish' course, I want to order by the Y-axis in ascending. | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" ORDER BY COUNT(date_of_enrolment) | SELECT "date_of_enrolment", COUNT("date_of_enrolment") FROM "Courses" "T1" JOIN "Student_Course_Enrolment" "T2" ON "T1"."course_id" = "T2"."course_id" WHERE "Spanish" = "T1"."course_name" ORDER BY COUNT("date_of_enrolment") | 0.217773 |
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
| Top tags by closed question ratio. | SELECT TagName, COUNT(ClosedPost.Id) / CAST(COUNT(*) AS FLOAT) AS ClosedRatio, COUNT(*) AS QuestionCount FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON PostTags.PostId = Posts.Id LEFT JOIN Posts AS ClosedPost ON Posts.Id = ClosedPost.Id AND ClosedPost.ClosedDate != '' WHERE Posts.PostTypeId = 1 GROUP BY TagName ORDER BY COUNT(ClosedPost.Id) / CAST(COUNT(*) AS FLOAT) DESC LIMIT 700 | SELECT "TagName", COUNT("ClosedPost"."Id") / NULLIF(CAST(COUNT(*) AS FLOAT), 0) AS "ClosedRatio", COUNT(*) AS "QuestionCount" FROM "Tags" JOIN "PostTags" ON "PostTags"."TagId" = "Tags"."Id" JOIN "Posts" ON "PostTags"."PostId" = "Posts"."Id" AND "Posts"."PostTypeId" = 1 LEFT JOIN "Posts" "ClosedPost" ON "ClosedPost"."ClosedDate" <> '' AND "ClosedPost"."Id" = "Posts"."Id" GROUP BY "TagName" ORDER BY COUNT("ClosedPost"."Id") / NULLIF(CAST(COUNT(*) AS FLOAT), 0) DESC FETCH FIRST 700 ROWS ONLY | 0.481445 |
CREATE TABLE table_78378 ("Season" CLOB, "1st Division" CLOB, "Relegated" CLOB, "2nd Division" CLOB, "Promoted" CLOB)
| What was relegated in the 2006 season? | SELECT "Relegated" FROM table_78378 WHERE "Season" = '2006' | SELECT "Relegated" FROM "table_78378" WHERE "Season" = '2006' | 0.05957 |
CREATE TABLE table_name_54 (show_name VARCHAR2, time VARCHAR2)
| What show has a time of 4:00pm 5:00am? | SELECT show_name FROM table_name_54 WHERE time = "4:00pm–5:00am" | SELECT "show_name" FROM "table_name_54" WHERE "4:00pm–5:00am" = "time" | 0.068359 |
CREATE TABLE table_name_42 (wins NUMBER, goal_difference VARCHAR2, draws VARCHAR2)
| Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7? | SELECT AVG(wins) FROM table_name_42 WHERE goal_difference > -24 AND draws > 7 | SELECT AVG("wins") FROM "table_name_42" WHERE "draws" > 7 AND "goal_difference" > -24 | 0.083008 |
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
| when was the last time that patient 002-4486 on 08/05/this year had a maximum sao2. | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-4486')) AND NOT vitalperiodic.sao2 IS NULL AND DATETIME(vitalperiodic.observationtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m-%d', vitalperiodic.observationtime) = '08-05' ORDER BY vitalperiodic.sao2 DESC, vitalperiodic.observationtime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '002-4486' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "vitalperiodic"."observationtime" FROM "vitalperiodic" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "vitalperiodic"."patientunitstayid" WHERE DATETIME("vitalperiodic"."observationtime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND NOT "_u_1"."" IS NULL AND NOT "vitalperiodic"."sao2" IS NULL AND STRFTIME('%m-%d', "vitalperiodic"."observationtime") = '08-05' ORDER BY "vitalperiodic"."sao2" DESC, "vitalperiodic"."observationtime" DESC FETCH FIRST 1 ROWS ONLY | 0.825195 |
CREATE TABLE table_204_7 (id NUMBER, "#" NUMBER, "date" CLOB, "film" CLOB, "gross" CLOB, "top ten places" CLOB)
| which movies were number 1 for at least two consecutive weeks ? | SELECT "film" FROM table_204_7 GROUP BY "film" HAVING COUNT(*) >= 2 | SELECT "film" FROM "table_204_7" GROUP BY "film" HAVING COUNT(*) >= 2 | 0.067383 |
CREATE TABLE Timed_Locations_of_Things (thing_id NUMBER, Date_and_Time DATETIME, Location_Code CHAR)
CREATE TABLE Services (service_id NUMBER, organization_id NUMBER, service_type_code CHAR, service_details VARCHAR2)
CREATE TABLE Organizations (organization_id NUMBER, parent_organization_id NUMBER, organization_details VARCHAR2)
CREATE TABLE Customers (customer_id NUMBER, customer_details VARCHAR2)
CREATE TABLE Residents (resident_id NUMBER, property_id NUMBER, date_moved_in DATETIME, date_moved_out DATETIME, other_details VARCHAR2)
CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID NUMBER, Customer_Event_ID NUMBER, service_type_code CHAR, resident_id NUMBER, property_id NUMBER, date_moved_in DATETIME)
CREATE TABLE Things (thing_id NUMBER, organization_id NUMBER, Type_of_Thing_Code CHAR, service_type_code CHAR, service_details VARCHAR2)
CREATE TABLE Timed_Status_of_Things (thing_id NUMBER, Date_and_Date DATETIME, Status_of_Thing_Code CHAR)
CREATE TABLE Residents_Services (resident_id NUMBER, service_id NUMBER, date_moved_in DATETIME, property_id NUMBER, date_requested DATETIME, date_provided DATETIME, other_details VARCHAR2)
CREATE TABLE Properties (property_id NUMBER, property_type_code CHAR, property_address VARCHAR2, other_details VARCHAR2)
CREATE TABLE Customer_Events (Customer_Event_ID NUMBER, customer_id NUMBER, date_moved_in DATETIME, property_id NUMBER, resident_id NUMBER, thing_id NUMBER)
| What are the distinct move in dates of the residents, and count them by a bar chart | SELECT date_moved_in, COUNT(date_moved_in) FROM Residents | SELECT "date_moved_in", COUNT("date_moved_in") FROM "Residents" | 0.061523 |
CREATE TABLE table_26406 ("Series #" FLOAT, "Season #" FLOAT, "Title" CLOB, "Directed by" CLOB, "Written by" CLOB, "Original air date" CLOB, "Prod. code" FLOAT)
| What is the production code for episode 31 in the series? | SELECT MIN("Prod. code") FROM table_26406 WHERE "Series #" = '31' | SELECT MIN("Prod. code") FROM "table_26406" WHERE "Series #" = '31' | 0.06543 |
CREATE TABLE table_name_26 (league_goals NUMBER, fa_cup_goals NUMBER)
| What is the average number of League Goals for palyers with 0 FA Cup Goals? | SELECT AVG(league_goals) FROM table_name_26 WHERE fa_cup_goals < 0 | SELECT AVG("league_goals") FROM "table_name_26" WHERE "fa_cup_goals" < 0 | 0.070313 |
CREATE TABLE table_930 ("Week" FLOAT, "Date" CLOB, "Opponent" CLOB, "Result" CLOB, "Stadium" CLOB, "Record" CLOB, "Attendance" FLOAT)
| what's the stadium with record being 1 1 | SELECT "Stadium" FROM table_930 WHERE "Record" = '1–1' | SELECT "Stadium" FROM "table_930" WHERE "Record" = '1–1' | 0.054688 |
CREATE TABLE table_name_52 (location_attendance VARCHAR2, date VARCHAR2)
| What is the location attendance of the game on February 25? | SELECT location_attendance FROM table_name_52 WHERE date = "february 25" | SELECT "location_attendance" FROM "table_name_52" WHERE "date" = "february 25" | 0.076172 |
CREATE TABLE election (election_id NUMBER, counties_represented CLOB, district NUMBER, delegate CLOB, party NUMBER, first_elected NUMBER, committee CLOB)
CREATE TABLE party (party_id NUMBER, year NUMBER, party CLOB, governor CLOB, lieutenant_governor CLOB, comptroller CLOB, attorney_general CLOB, us_senate CLOB)
CREATE TABLE county (county_id NUMBER, county_name CLOB, population NUMBER, zip_code CLOB)
| Who is the delegate of district 1 in the elections? | SELECT delegate FROM election WHERE district = 1 | SELECT "delegate" FROM "election" WHERE "district" = 1 | 0.052734 |
CREATE TABLE table_70952 ("D 47 +" CLOB, "D 46 +" CLOB, "D 45 +" CLOB, "D 44 +" CLOB, "D 43 O" CLOB, "D 42 O" CLOB, "D 41 \\u221a" CLOB, "D 40 \\u221a" CLOB)
| Name the D 45+ which has D 42 of r 14 | SELECT "D 45 +" FROM table_70952 WHERE "D 42 O" = 'r 14' | SELECT "D 45 +" FROM "table_70952" WHERE "D 42 O" = 'r 14' | 0.056641 |
CREATE TABLE guests (guest_id NUMBER, gender_code CLOB, guest_first_name CLOB, guest_last_name CLOB, date_of_birth TIME)
CREATE TABLE view_unit_status (apt_id NUMBER, apt_booking_id NUMBER, status_date TIME, available_yn others)
CREATE TABLE apartments (apt_id NUMBER, building_id NUMBER, apt_type_code CLOB, apt_number CLOB, bathroom_count NUMBER, bedroom_count NUMBER, room_count CLOB)
CREATE TABLE apartment_facilities (apt_id NUMBER, facility_code CLOB)
CREATE TABLE apartment_buildings (building_id NUMBER, building_short_name CLOB, building_full_name CLOB, building_description CLOB, building_address CLOB, building_manager CLOB, building_phone CLOB)
CREATE TABLE apartment_bookings (apt_booking_id NUMBER, apt_id NUMBER, guest_id NUMBER, booking_status_code CLOB, booking_start_date TIME, booking_end_date TIME)
| What is the booking status code of the apartment with apartment number 'Suite 634'? | SELECT T1.booking_status_code FROM apartment_bookings AS T1 JOIN apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634" | SELECT "T1"."booking_status_code" FROM "apartment_bookings" "T1" JOIN "apartments" "T2" ON "Suite 634" = "T2"."apt_number" AND "T1"."apt_id" = "T2"."apt_id" | 0.152344 |
CREATE TABLE Course_Authors_and_Tutors (author_id NUMBER, author_tutor_ATB VARCHAR2, login_name VARCHAR2, password VARCHAR2, personal_name VARCHAR2, middle_name VARCHAR2, family_name VARCHAR2, gender_mf VARCHAR2, address_line_1 VARCHAR2)
CREATE TABLE Students (student_id NUMBER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR2, password VARCHAR2, personal_name VARCHAR2, middle_name VARCHAR2, family_name VARCHAR2)
CREATE TABLE Courses (course_id NUMBER, author_id NUMBER, subject_id NUMBER, course_name VARCHAR2, course_description VARCHAR2)
CREATE TABLE Student_Tests_Taken (registration_id NUMBER, date_test_taken DATETIME, test_result VARCHAR2)
CREATE TABLE Student_Course_Enrolment (registration_id NUMBER, student_id NUMBER, course_id NUMBER, date_of_enrolment DATETIME, date_of_completion DATETIME)
CREATE TABLE Subjects (subject_id NUMBER, subject_name VARCHAR2)
| Find the number of courses for each subject in a bar chart, and could you show in asc by the y axis? | SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) | SELECT "subject_name", COUNT(*) FROM "Courses" "T1" JOIN "Subjects" "T2" ON "T1"."subject_id" = "T2"."subject_id" GROUP BY "T1"."subject_id" ORDER BY COUNT(*) | 0.154297 |
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| what is diagnoses icd9 code and diagnoses short title of subject name kenneth koeller? | SELECT diagnoses.icd9_code, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Kenneth Koeller" | SELECT "diagnoses"."icd9_code", "diagnoses"."short_title" FROM "demographic" JOIN "diagnoses" ON "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "Kenneth Koeller" = "demographic"."name" | 0.186523 |
CREATE TABLE table_name_9 (d_shulman VARCHAR2, c_abate VARCHAR2)
| What is the number for D. Shulman if C. Abate has 728 (43%) | SELECT d_shulman FROM table_name_9 WHERE c_abate = "728 (43%)" | SELECT "d_shulman" FROM "table_name_9" WHERE "728 (43%)" = "c_abate" | 0.066406 |
CREATE TABLE table_203_758 (id NUMBER, "no." NUMBER, "dub no." NUMBER, "english dubbed title / english subbed title\ original japanese title" CLOB, "original air date" CLOB, "english air date" CLOB)
| how many episodes aired originally but not in english ? | SELECT COUNT("english dubbed title / english subbed title\noriginal japanese title") FROM table_203_758 WHERE NOT "original air date" IS NULL AND "english air date" IS NULL | SELECT COUNT("english dubbed title / english subbed title\noriginal japanese title") FROM "table_203_758" WHERE "english air date" IS NULL AND NOT "original air date" IS NULL | 0.169922 |
CREATE TABLE table_17102076_5 (team VARCHAR2, location_attendance VARCHAR2)
| Name the team for arco arena 13,685 | SELECT team FROM table_17102076_5 WHERE location_attendance = "ARCO Arena 13,685" | SELECT "team" FROM "table_17102076_5" WHERE "ARCO Arena 13,685" = "location_attendance" | 0.084961 |
CREATE TABLE table_26908 ("Codename ( main article ) " CLOB, "Brand name ( list ) " CLOB, "Cores" FLOAT, "L3 Cache" CLOB, "Socket" CLOB, "TDP" CLOB, "I/O Bus" CLOB)
| What i/o buses are associated with the brand name Core i3-21xxt? | SELECT "I/O Bus" FROM table_26908 WHERE "Brand name (list)" = 'Core i3-21xxT' | SELECT "I/O Bus" FROM "table_26908" WHERE "Brand name (list)" = 'Core i3-21xxT' | 0.077148 |
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
| how many patients are with white ethnicity and drug route id? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.route = "ID" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "ID" = "prescriptions"."route" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "WHITE" = "demographic"."ethnicity" | 0.21582 |
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
| Top users rep per x weeks. | SELECT SUM(pst.Score), QA, usr.DisplayName, SUM(upv) AS uv, SUM(downv) AS dv FROM (SELECT p.Id AS postid, CASE WHEN p.PostTypeId = 1 THEN 'Q' ELSE 'A' END AS QA, MIN(p.OwnerUserId) AS uid, COUNT(*) AS upv, 0 AS downv FROM Posts AS p INNER JOIN Votes AS v ON v.PostId = p.Id WHERE v.VoteTypeId = 2 GROUP BY p.PostTypeId, p.Id UNION SELECT p.Id, CASE WHEN p.PostTypeId = 1 THEN 'Q' ELSE 'A' END AS QA, MIN(p.OwnerUserId), 0 AS upv2, COUNT(*) AS dv2 FROM Posts AS p INNER JOIN Votes AS v ON v.PostId = p.Id WHERE v.VoteTypeId = 3 GROUP BY p.PostTypeId, p.Id) AS fact INNER JOIN Users AS usr ON fact.uid = usr.Id INNER JOIN Posts AS pst ON fact.PostId = pst.Id GROUP BY qa, usr.DisplayName ORDER BY usr.DisplayName, QA | WITH "fact" AS (SELECT "p"."Id" AS "postid", CASE WHEN "p"."PostTypeId" = 1 THEN 'Q' ELSE 'A' END AS "QA", MIN("p"."OwnerUserId") AS "uid", COUNT(*) AS "upv", 0 AS "downv" FROM "Posts" "p" JOIN "Votes" "v" ON "p"."Id" = "v"."PostId" AND "v"."VoteTypeId" = 2 GROUP BY "p"."PostTypeId", "p"."Id" UNION SELECT "p"."Id", CASE WHEN "p"."PostTypeId" = 1 THEN 'Q' ELSE 'A' END AS "QA", MIN("p"."OwnerUserId"), 0 AS "upv2", COUNT(*) AS "dv2" FROM "Posts" "p" JOIN "Votes" "v" ON "p"."Id" = "v"."PostId" AND "v"."VoteTypeId" = 3 GROUP BY "p"."PostTypeId", "p"."Id") SELECT SUM("pst"."Score"), "QA", "usr"."DisplayName", SUM("upv") AS "uv", SUM("downv") AS "dv" FROM "fact" "fact" JOIN "Posts" "pst" ON "fact"."PostId" = "pst"."Id" JOIN "Users" "usr" ON "fact"."uid" = "usr"."Id" GROUP BY "qa", "usr"."DisplayName" ORDER BY "usr"."DisplayName", "QA" | 0.819336 |
CREATE TABLE table_name_99 (grid VARCHAR2, driver VARCHAR2)
| What is the Grid for Rubens Barrichello? | SELECT grid FROM table_name_99 WHERE driver = "rubens barrichello" | SELECT "grid" FROM "table_name_99" WHERE "driver" = "rubens barrichello" | 0.070313 |
CREATE TABLE table_10081 ("Institution" CLOB, "Location" CLOB, "Team Nickname" CLOB, "Joined TSCHL" FLOAT, "Home Arena" CLOB, "Capacity" FLOAT, "Team Website" CLOB)
| what is the team nickname when joined tschl is 2010 and home arena is kettering rec center and the team website is dayton hockey? | SELECT "Team Nickname" FROM table_10081 WHERE "Joined TSCHL" = '2010' AND "Home Arena" = 'kettering rec center' AND "Team Website" = 'dayton hockey' | SELECT "Team Nickname" FROM "table_10081" WHERE "Home Arena" = 'kettering rec center' AND "Joined TSCHL" = '2010' AND "Team Website" = 'dayton hockey' | 0.146484 |
CREATE TABLE hosting_city (host_city VARCHAR2, year NUMBER)
CREATE TABLE city (city VARCHAR2, city_id VARCHAR2)
| Find the cities which were once a host city after 2010? | SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010 | SELECT "T1"."city" FROM "city" "T1" JOIN "hosting_city" "T2" ON "T1"."city_id" = "T2"."host_city" AND "T2"."year" > 2010 | 0.117188 |
CREATE TABLE table_name_81 (year VARCHAR2, pigs NUMBER)
| How many years had fewer than 2089.2 pigs? | SELECT COUNT(year) FROM table_name_81 WHERE pigs < 2089.2 | SELECT COUNT("year") FROM "table_name_81" WHERE "pigs" < 2089.2 | 0.061523 |
CREATE TABLE table_15200 ("Tournament" CLOB, "2007" CLOB, "2008" CLOB, "2009" CLOB, "2010" CLOB, "2011" CLOB, "2012" CLOB)
| Name the 2008 for 2012 being a and tournament of australian open | SELECT "2008" FROM table_15200 WHERE "2012" = 'a' AND "Tournament" = 'australian open' | SELECT "2008" FROM "table_15200" WHERE "2012" = 'a' AND "Tournament" = 'australian open' | 0.085938 |
CREATE TABLE table_62220 ("Name" CLOB, "Area ( km\\u00b2 ) " FLOAT, "Pop." FLOAT, "Pop/Area ( 1/km\\u00b2 ) " FLOAT, "No P." FLOAT, "No C./No T." CLOB, "Subregion" CLOB)
| Which Pop/Area (1/km ) has a No P. larger than 1, and a Name of albergaria-a-velha? | SELECT AVG("Pop/Area (1/km\u00b2)") FROM table_62220 WHERE "No P." > '1' AND "Name" = 'albergaria-a-velha' | SELECT AVG("Pop/Area (1/km\u00b2)") FROM "table_62220" WHERE "Name" = 'albergaria-a-velha' AND "No P." > '1' | 0.105469 |
CREATE TABLE table_79496 ("Athlete" CLOB, "Nationality" CLOB, "2.15" CLOB, "2.20" CLOB, "2.25" CLOB, "Result" FLOAT)
| Which athlete from Brazil has 2.20 O and 2.25 of XXX? | SELECT "Athlete" FROM table_79496 WHERE "2.20" = 'o' AND "2.25" = 'xxx' AND "Nationality" = 'brazil' | SELECT "Athlete" FROM "table_79496" WHERE "2.20" = 'o' AND "2.25" = 'xxx' AND "Nationality" = 'brazil' | 0.099609 |
CREATE TABLE table_66098 ("Continent" CLOB, "Location" CLOB, "City" CLOB, "Date" CLOB, "Year" FLOAT)
| What is the lowest year when the city is casablanca? | SELECT MIN("Year") FROM table_66098 WHERE "City" = 'casablanca' | SELECT MIN("Year") FROM "table_66098" WHERE "City" = 'casablanca' | 0.063477 |
CREATE TABLE table_204_736 (id NUMBER, "party" CLOB, "candidate" CLOB, "votes" NUMBER)
| which candidate had the most votes ? | SELECT "candidate" FROM table_204_736 ORDER BY "votes" DESC LIMIT 1 | SELECT "candidate" FROM "table_204_736" ORDER BY "votes" DESC FETCH FIRST 1 ROWS ONLY | 0.083008 |
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
| tell me the type of admission patient with patient id 53707 had. | SELECT demographic.admission_type FROM demographic WHERE demographic.subject_id = "53707" | SELECT "demographic"."admission_type" FROM "demographic" WHERE "53707" = "demographic"."subject_id" | 0.09668 |
CREATE TABLE table_1644857_2 (skip VARCHAR2, pf VARCHAR2)
| Who was skip for the country whose points for (PF) was 73? | SELECT skip FROM table_1644857_2 WHERE pf = 73 | SELECT "skip" FROM "table_1644857_2" WHERE "pf" = 73 | 0.050781 |
CREATE TABLE table_56489 ("Driver" CLOB, "Constructor" CLOB, "Laps" FLOAT, "Time/Retired" CLOB, "Grid" FLOAT)
| Who constructed the car that has a Time/Retired of +2:06.0? | SELECT "Constructor" FROM table_56489 WHERE "Time/Retired" = '+2:06.0' | SELECT "Constructor" FROM "table_56489" WHERE "Time/Retired" = '+2:06.0' | 0.070313 |
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE transfers (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, eventtype CLOB, careunit CLOB, wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE icustays (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, first_careunit CLOB, last_careunit CLOB, first_wardid NUMBER, last_wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
| what were the top four frequent microbiology tests that patients had in the same month after they had had a ven cath renal dialysis procedure until 3 years ago? | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'ven cath renal dialysis') AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id WHERE DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.charttime, 'start of month') GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 4 | WITH "t2" AS (SELECT "admissions"."subject_id", "microbiologyevents"."spec_type_desc", "microbiologyevents"."charttime" FROM "microbiologyevents" JOIN "admissions" ON "admissions"."hadm_id" = "microbiologyevents"."hadm_id" WHERE DATETIME("microbiologyevents"."charttime") <= DATETIME(CURRENT_TIME(), '-3 year')), "t3" AS (SELECT "t2"."spec_type_desc", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS "c1" FROM "procedures_icd" JOIN "d_icd_procedures" ON "d_icd_procedures"."icd9_code" = "procedures_icd"."icd9_code" AND "d_icd_procedures"."short_title" = 'ven cath renal dialysis' JOIN "admissions" ON "admissions"."hadm_id" = "procedures_icd"."hadm_id" JOIN "t2" "t2" ON "admissions"."subject_id" = "t2"."subject_id" AND "procedures_icd"."charttime" < "t2"."charttime" AND DATETIME("procedures_icd"."charttime", 'start of month') = DATETIME("t2"."charttime", 'start of month') WHERE DATETIME("procedures_icd"."charttime") <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY "t2"."spec_type_desc") SELECT "t3"."spec_type_desc" FROM "t3" "t3" WHERE "t3"."c1" <= 4 | 1.03125 |
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
| Find other users from a user's question. | SELECT Id, Id AS "post_link", ParentId, Title, OwnerUserId FROM Posts WHERE OwnerUserId = '##UserId##' AND PostTypeId = 1 | SELECT "Id", "Id" AS "post_link", "ParentId", "Title", "OwnerUserId" FROM "Posts" WHERE "OwnerUserId" = '##UserId##' AND "PostTypeId" = 1 | 0.133789 |
CREATE TABLE table_204_835 (id NUMBER, "rank" NUMBER, "lane" NUMBER, "name" CLOB, "nationality" CLOB, "time" CLOB, "notes" CLOB)
| which competitor was the last to place ? | SELECT "name" FROM table_204_835 ORDER BY "rank" DESC LIMIT 1 | SELECT "name" FROM "table_204_835" ORDER BY "rank" DESC FETCH FIRST 1 ROWS ONLY | 0.077148 |
CREATE TABLE table_10602294_1 (dates_active VARCHAR2, deaths VARCHAR2)
| What were the active dates for the storm that had 185km/h (115mph) deaths? | SELECT dates_active FROM table_10602294_1 WHERE deaths = "185km/h (115mph)" | SELECT "dates_active" FROM "table_10602294_1" WHERE "185km/h (115mph)" = "deaths" | 0.079102 |
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| give me the number of patients whose days of hospital stay is greater than 9 and diagnoses icd9 code is 311? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "9" AND diagnoses.icd9_code = "311" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "311" = "diagnoses"."icd9_code" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "9" < "demographic"."days_stay" | 0.205078 |
CREATE TABLE table_name_36 (year VARCHAR2, notes VARCHAR2, competition VARCHAR2)
| what is the year when the notes is 5000 m and the competition is world junior championships in athletics? | SELECT COUNT(year) FROM table_name_36 WHERE notes = "5000 m" AND competition = "world junior championships in athletics" | SELECT COUNT("year") FROM "table_name_36" WHERE "5000 m" = "notes" AND "competition" = "world junior championships in athletics" | 0.125 |
CREATE TABLE hall_of_fame (player_id CLOB, yearid NUMBER, votedby CLOB, ballots CLOB, needed CLOB, votes CLOB, inducted CLOB, category CLOB, needed_note CLOB)
CREATE TABLE player_award (player_id CLOB, award_id CLOB, year NUMBER, league_id CLOB, tie CLOB, notes CLOB)
CREATE TABLE player_award_vote (award_id CLOB, year NUMBER, league_id CLOB, player_id CLOB, points_won NUMBER, points_max NUMBER, votes_first CLOB)
CREATE TABLE salary (year NUMBER, team_id CLOB, league_id CLOB, player_id CLOB, salary NUMBER)
CREATE TABLE player (player_id CLOB, birth_year CLOB, birth_month CLOB, birth_day CLOB, birth_country CLOB, birth_state CLOB, birth_city CLOB, death_year CLOB, death_month CLOB, death_day CLOB, death_country CLOB, death_state CLOB, death_city CLOB, name_first CLOB, name_last CLOB, name_given CLOB, weight CLOB)
| Which award has the highest player's salary? | SELECT award_id FROM player_award AS T1 JOIN salary AS T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id ORDER BY AVG(T2.salary) DESC LIMIT 1 | SELECT "award_id" FROM "player_award" "T1" JOIN "salary" "T2" ON "T1"."player_id" = "T2"."player_id" GROUP BY "T1"."award_id" ORDER BY AVG("T2"."salary") DESC FETCH FIRST 1 ROWS ONLY | 0.177734 |
CREATE TABLE table_204_654 (id NUMBER, "year" NUMBER, "song" CLOB, "u.s." NUMBER, "u.s.\ r&b" NUMBER, "u.s.\ ac" NUMBER, "uk" NUMBER, "album" CLOB)
| how many songs did they have the previous year of 1987 ? | SELECT COUNT("song") FROM table_204_654 WHERE "year" < 1987 | SELECT COUNT("song") FROM "table_204_654" WHERE "year" < 1987 | 0.05957 |
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| specify birthdate and death status of patient james sloan | SELECT demographic.dob, demographic.expire_flag FROM demographic WHERE demographic.name = "James Sloan" | SELECT "demographic"."dob", "demographic"."expire_flag" FROM "demographic" WHERE "James Sloan" = "demographic"."name" | 0.114258 |
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
| Tag ratings in dynamic SQL. New version: https://data.stackexchange.com/anime/query/745962/tag-ratings | SELECT @foo | SELECT @foo | 0.010742 |
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
| Most viewed questions with a tag converted to a synonym since then. | SELECT Posts.Id AS "post_link", Posts.ViewCount, TagSynonyms.SourceTagName AS "Its tag...", TagSynonyms.TargetTagName AS "...is a synonym of" FROM TagSynonyms, Tags, PostTags, Posts WHERE Tags.TagName = TagSynonyms.SourceTagName AND PostTags.TagId = Tags.Id AND Posts.Id = PostTags.PostId ORDER BY Posts.ViewCount DESC, Posts.Id DESC LIMIT 100 | SELECT "Posts"."Id" AS "post_link", "Posts"."ViewCount", "TagSynonyms"."SourceTagName" AS "Its tag...", "TagSynonyms"."TargetTagName" AS "...is a synonym of" FROM "TagSynonyms" JOIN "Tags" ON "TagSynonyms"."SourceTagName" = "Tags"."TagName" JOIN "PostTags" ON "PostTags"."TagId" = "Tags"."Id" JOIN "Posts" ON "PostTags"."PostId" = "Posts"."Id" ORDER BY "Posts"."ViewCount" DESC, "Posts"."Id" DESC FETCH FIRST 100 ROWS ONLY | 0.412109 |
CREATE TABLE trip (start_station_name VARCHAR2, end_station_name VARCHAR2, id VARCHAR2)
| Give me the start station and end station for the trips with the three oldest id. | SELECT start_station_name, end_station_name FROM trip ORDER BY id LIMIT 3 | SELECT "start_station_name", "end_station_name" FROM "trip" ORDER BY "id" FETCH FIRST 3 ROWS ONLY | 0.094727 |
CREATE TABLE table_203_784 (id NUMBER, "no. in\ series" NUMBER, "no. in\ season" NUMBER, "performer" CLOB, "appearance" CLOB, "air date" CLOB)
| what is the name of the last performer on this chart ? | SELECT "performer" FROM table_203_784 ORDER BY id DESC LIMIT 1 | SELECT "performer" FROM "table_203_784" ORDER BY "id" DESC FETCH FIRST 1 ROWS ONLY | 0.080078 |
CREATE TABLE table_38794 ("Season" CLOB, "Team" CLOB, "Wins" CLOB, "Losses" CLOB, "Draws" CLOB)
| Which season had 10 draws? | SELECT "Season" FROM table_38794 WHERE "Draws" = '10' | SELECT "Season" FROM "table_38794" WHERE "Draws" = '10' | 0.053711 |
CREATE TABLE table_25290 ("Rnd" FLOAT, "Date" CLOB, "Race Name" CLOB, "Length" CLOB, "Track" CLOB, "Location" CLOB, "Type" CLOB, "Pole Position" CLOB, "Winning Driver" CLOB)
| Who had the pole position in the August 15, 1981 race? | SELECT "Pole Position" FROM table_25290 WHERE "Date" = 'August 15, 1981' | SELECT "Pole Position" FROM "table_25290" WHERE "Date" = 'August 15, 1981' | 0.072266 |
CREATE TABLE table_27887723_1 (race_name VARCHAR2, uci_rating VARCHAR2)
| what race name had a uci rating of cn? | SELECT race_name FROM table_27887723_1 WHERE uci_rating = "CN" | SELECT "race_name" FROM "table_27887723_1" WHERE "CN" = "uci_rating" | 0.066406 |
CREATE TABLE table_6353 ("Club" CLOB, "Played" CLOB, "Drawn" CLOB, "Lost" CLOB, "Points for" CLOB, "Points against" CLOB, "Tries for" CLOB, "Tries against" CLOB, "Try bonus" CLOB, "Losing bonus" CLOB, "Points" CLOB)
| How many tries against did the club with 383 points against have? | SELECT "Tries against" FROM table_6353 WHERE "Points against" = '383' | SELECT "Tries against" FROM "table_6353" WHERE "Points against" = '383' | 0.069336 |
CREATE TABLE table_203_438 (id NUMBER, "year" NUMBER, "title" CLOB, "role" CLOB, "notes" CLOB)
| what film did damon produce right after monster ? | SELECT "title" FROM table_203_438 WHERE id = (SELECT id FROM table_203_438 WHERE "title" = 'monster') - 1 | SELECT "title" FROM "table_203_438" WHERE "id" = (SELECT "id" FROM "table_203_438" WHERE "title" = 'monster') - 1 | 0.110352 |
CREATE TABLE table_73399 ("District" CLOB, "Vacator" CLOB, "Reason for change" CLOB, "Successor" CLOB, "Date successor seated" CLOB)
| How many vacators have October 22, 1808 as date successor seated? | SELECT COUNT("Vacator") FROM table_73399 WHERE "Date successor seated" = 'October 22, 1808' | SELECT COUNT("Vacator") FROM "table_73399" WHERE "Date successor seated" = 'October 22, 1808' | 0.09082 |
CREATE TABLE table_48867 ("Season" FLOAT, "Total Attendance" FLOAT, "Games" FLOAT, "Average" FLOAT, "High avg." FLOAT, "Team" CLOB, "No. Of Clubs" FLOAT)
| What is the number of clubs when the average is more than 18,571, there are fewer than 182 games and the total attendance is 3,140,280 in a year more recent than 1995? | SELECT AVG("No. Of Clubs") FROM table_48867 WHERE "Average" > '18,571' AND "Games" < '182' AND "Total Attendance" = '3,140,280' AND "Season" > '1995' | SELECT AVG("No. Of Clubs") FROM "table_48867" WHERE "Average" > '18,571' AND "Games" < '182' AND "Season" > '1995' AND "Total Attendance" = '3,140,280' | 0.147461 |
CREATE TABLE table_name_88 (gold_coast VARCHAR2, auckland VARCHAR2, melbourne VARCHAR2)
| Name the gold coast which has an auckland of no and melbourne of yes | SELECT gold_coast FROM table_name_88 WHERE auckland = "no" AND melbourne = "yes" | SELECT "gold_coast" FROM "table_name_88" WHERE "auckland" = "no" AND "melbourne" = "yes" | 0.085938 |
CREATE TABLE table_24108789_6 (points VARCHAR2, reset_points VARCHAR2)
| Name the total number of points for 800 reset | SELECT COUNT(points) FROM table_24108789_6 WHERE reset_points = 800 | SELECT COUNT("points") FROM "table_24108789_6" WHERE "reset_points" = 800 | 0.071289 |
CREATE TABLE table_name_74 (nationality VARCHAR2, player VARCHAR2)
| What Nationality is Dave Hynes? | SELECT nationality FROM table_name_74 WHERE player = "dave hynes" | SELECT "nationality" FROM "table_name_74" WHERE "dave hynes" = "player" | 0.069336 |