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 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 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)
| give me the number of patients whose year of birth is less than 2150 and drug route is td? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2150" AND prescriptions.route = "TD" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "TD" = "prescriptions"."route" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "2150" > "demographic"."dob_year" | 0.213867 |
CREATE TABLE table_name_57 (population_estimate__2013_ NUMBER, percentage VARCHAR2)
| What is the lowest 2013 population estimate of the province with a 23.7 percentage? | SELECT MIN(population_estimate__2013_) FROM table_name_57 WHERE percentage = 23.7 | SELECT MIN("population_estimate__2013_") FROM "table_name_57" WHERE "percentage" = 23.7 | 0.084961 |
CREATE TABLE table_12032893_1 (home_town VARCHAR2, high_school VARCHAR2)
| Which home town was the high school Catholic University located in? | SELECT home_town FROM table_12032893_1 WHERE high_school = "Catholic University" | SELECT "home_town" FROM "table_12032893_1" WHERE "Catholic University" = "high_school" | 0.083984 |
CREATE TABLE table_36559 ("Week" FLOAT, "Date" CLOB, "Opponent" CLOB, "Result" CLOB, "Attendance" FLOAT)
| What was the average week for the gaime against the philadelphia eagles with less than 31,066 in attendance? | SELECT AVG("Week") FROM table_36559 WHERE "Opponent" = 'philadelphia eagles' AND "Attendance" < '31,066' | SELECT AVG("Week") FROM "table_36559" WHERE "Attendance" < '31,066' AND "Opponent" = 'philadelphia eagles' | 0.103516 |
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
| For Prof. Wen Zhou 's classes , do they always meet on Friday ? | SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course_offering.friday = 'N' AND instructor.name LIKE '%Wen Zhou%' | SELECT COUNT(*) = 0 FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" AND "course_offering"."friday" = 'N' JOIN "offering_instructor" ON "course_offering"."offering_id" = "offering_instructor"."offering_id" JOIN "instructor" ON "instructor"."instructor_id" = "offering_instructor"."instructor_id" AND "instructor"."name" LIKE '%Wen Zhou%' | 0.37207 |
CREATE TABLE table_23397 ("No. in series" CLOB, "No. in season" FLOAT, "Family/families" CLOB, "Location ( s ) " CLOB, "Original air date" CLOB)
| What episode in the season was episode us17 in the series? | SELECT COUNT("No. in season") FROM table_23397 WHERE "No. in series" = 'US17' | SELECT COUNT("No. in season") FROM "table_23397" WHERE "No. in series" = 'US17' | 0.077148 |
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
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 dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
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 class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
CREATE TABLE fare_basis (fare_basis_code CLOB, booking_class CLOB, class_type CLOB, premium CLOB, economy CLOB, discounted CLOB, night CLOB, season CLOB, basis_days CLOB)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note 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)
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 flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type 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 equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
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 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_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
| what flights takeoff and land at MKE | SELECT DISTINCT flight.flight_id FROM airport AS AIRPORT_0, airport AS AIRPORT_1, flight WHERE (flight.to_airport = AIRPORT_0.airport_code AND AIRPORT_0.airport_code = 'MKE') OR (flight.from_airport = AIRPORT_1.airport_code AND AIRPORT_1.airport_code = 'MKE') | SELECT DISTINCT "flight"."flight_id" FROM "airport" "AIRPORT_0" JOIN "airport" "AIRPORT_1" ON "AIRPORT_0"."airport_code" = 'MKE' OR "AIRPORT_1"."airport_code" = 'MKE' JOIN "flight" ON ("AIRPORT_0"."airport_code" = "flight"."to_airport" OR "AIRPORT_1"."airport_code" = "flight"."from_airport") AND ("AIRPORT_0"."airport_code" = "flight"."to_airport" OR "AIRPORT_1"."airport_code" = 'MKE') AND ("AIRPORT_0"."airport_code" = 'MKE' OR "AIRPORT_1"."airport_code" = "flight"."from_airport") | 0.472656 |
CREATE TABLE table_204_784 (id NUMBER, "player" CLOB, "league" NUMBER, "cup" NUMBER, "europa league" NUMBER, "total" NUMBER)
| who had the most goal scores ? | SELECT "player" FROM table_204_784 ORDER BY "total" DESC LIMIT 1 | SELECT "player" FROM "table_204_784" ORDER BY "total" DESC FETCH FIRST 1 ROWS ONLY | 0.080078 |
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)
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)
| give me the number of patients whose admission type is urgent and admission year is less than 2190? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear < "2190" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "2190" > "demographic"."admityear" AND "URGENT" = "demographic"."admission_type" | 0.151367 |
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 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)
| how many patients are admitted before the year 2154 and diagnosed with dmii oth uncntrld? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2154" AND diagnoses.short_title = "DMII oth uncntrld" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "DMII oth uncntrld" = "diagnoses"."short_title" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "2154" > "demographic"."admityear" | 0.223633 |
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
| How many credits is 216 worth ? | SELECT DISTINCT credits FROM course WHERE department = 'EECS' AND number = 216 | SELECT DISTINCT "credits" FROM "course" WHERE "department" = 'EECS' AND "number" = 216 | 0.083984 |
CREATE TABLE table_name_27 (time VARCHAR2, opponent VARCHAR2)
| How long was his fight against kim kyoung-suk? | SELECT time FROM table_name_27 WHERE opponent = "kim kyoung-suk" | SELECT "time" FROM "table_name_27" WHERE "kim kyoung-suk" = "opponent" | 0.068359 |
CREATE TABLE table_27700530_9 (team VARCHAR2, game VARCHAR2)
| How many games were numbered 13? | SELECT COUNT(team) FROM table_27700530_9 WHERE game = 13 | SELECT COUNT("team") FROM "table_27700530_9" WHERE "game" = 13 | 0.060547 |
CREATE TABLE Student (StuID NUMBER, LName VARCHAR2, Fname VARCHAR2, Age NUMBER, Sex VARCHAR2, Major NUMBER, Advisor NUMBER, city_code VARCHAR2)
CREATE TABLE Participates_in (stuid NUMBER, actid NUMBER)
CREATE TABLE Faculty_Participates_in (FacID NUMBER, actid NUMBER)
CREATE TABLE Faculty (FacID NUMBER, Lname VARCHAR2, Fname VARCHAR2, Rank VARCHAR2, Sex VARCHAR2, Phone NUMBER, Room VARCHAR2, Building VARCHAR2)
CREATE TABLE Activity (actid NUMBER, activity_name VARCHAR2)
| How many faculty members does each building have? List the result with the name of the building Visualize by bar chart, order total number from low to high order. | SELECT Building, COUNT(*) FROM Faculty GROUP BY Building ORDER BY COUNT(*) | SELECT "Building", COUNT(*) FROM "Faculty" GROUP BY "Building" ORDER BY COUNT(*) | 0.078125 |
CREATE TABLE table_25869317_1 (gdp__ppp__per_capita NUMBER)
| What is the lowest GDP (ppp) per capita? | SELECT MIN(gdp__ppp__per_capita) FROM table_25869317_1 | SELECT MIN("gdp__ppp__per_capita") FROM "table_25869317_1" | 0.056641 |
CREATE TABLE table_12606 ("Engine" CLOB, "Capacity ( l ) " FLOAT, "Power ( hp ) " FLOAT, "Torque" CLOB, "Used" CLOB)
| When was power (hp) less than 93 for the OM324 engine used? | SELECT "Used" FROM table_12606 WHERE "Power (hp)" < '93' AND "Engine" = 'om324' | SELECT "Used" FROM "table_12606" WHERE "Engine" = 'om324' AND "Power (hp)" < '93' | 0.079102 |
CREATE TABLE table_name_70 (grid NUMBER, time VARCHAR2, laps VARCHAR2)
| Can you tell me the highest Grid that has the Time of +15.532, and the Laps larger than 23? | SELECT MAX(grid) FROM table_name_70 WHERE time = "+15.532" AND laps > 23 | SELECT MAX("grid") FROM "table_name_70" WHERE "+15.532" = "time" AND "laps" > 23 | 0.078125 |
CREATE TABLE table_51729 ("Player" CLOB, "Nationality" CLOB, "Position" CLOB, "Years for Jazz" CLOB, "School/Club Team" CLOB)
| What School/Club Team is Player Howard Wood from? | SELECT "School/Club Team" FROM table_51729 WHERE "Player" = 'howard wood' | SELECT "School/Club Team" FROM "table_51729" WHERE "Player" = 'howard wood' | 0.073242 |
CREATE TABLE table_21346 ("Date" CLOB, "Opponent" CLOB, "Venue" CLOB, "Result" CLOB, "Attendance" FLOAT, "Competition" CLOB, "Man of the Match" CLOB)
| Name the opponent for 4th | SELECT "Opponent" FROM table_21346 WHERE "Date" = '4th' | SELECT "Opponent" FROM "table_21346" WHERE "Date" = '4th' | 0.055664 |
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description 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 dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE flight (aircraft_code_sequence CLOB, airline_code VARCHAR2, airline_flight CLOB, arrival_time NUMBER, connections NUMBER, departure_time NUMBER, dual_carrier CLOB, flight_days CLOB, flight_id NUMBER, flight_number NUMBER, from_airport VARCHAR2, meal_code CLOB, stops NUMBER, time_elapsed NUMBER, to_airport VARCHAR2)
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code 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 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 flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type VARCHAR2)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note 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 flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
CREATE TABLE airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE fare (fare_id NUMBER, from_airport VARCHAR2, to_airport VARCHAR2, fare_basis_code CLOB, fare_airline CLOB, restriction_code CLOB, one_direction_cost NUMBER, round_trip_cost NUMBER, round_trip_required VARCHAR2)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
CREATE TABLE days (days_code VARCHAR2, day_name 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)
| i need a flight on AA from MIAMI to CHICAGO that arrives around 5pm | 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, flight WHERE (((flight.arrival_time <= 1730 AND flight.arrival_time >= 1630) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CHICAGO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MIAMI' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'AA' | SELECT DISTINCT "flight"."flight_id" FROM "airport_service" "AIRPORT_SERVICE_0" JOIN "city" "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'MIAMI' JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" AND "flight"."airline_code" = 'AA' AND "flight"."arrival_time" <= 1730 AND "flight"."arrival_time" >= 1630 JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'CHICAGO' | 0.584961 |
CREATE TABLE table_77192 ("Date" CLOB, "Round" CLOB, "Opponent" CLOB, "Venue" CLOB, "Result" CLOB, "Attendance" FLOAT)
| what is the date when the round is qf? | SELECT "Date" FROM table_77192 WHERE "Round" = 'qf' | SELECT "Date" FROM "table_77192" WHERE "Round" = 'qf' | 0.051758 |
CREATE TABLE table_36673 ("Rank" FLOAT, "Nation" CLOB, "Gold" FLOAT, "Silver" FLOAT, "Bronze" FLOAT, "Total" FLOAT)
| Which Rank has a Bronze larger than 1, and a Silver larger than 0, and a Nation of norway (host nation), and a Total larger than 16? | SELECT COUNT("Rank") FROM table_36673 WHERE "Bronze" > '1' AND "Silver" > '0' AND "Nation" = 'norway (host nation)' AND "Total" > '16' | SELECT COUNT("Rank") FROM "table_36673" WHERE "Bronze" > '1' AND "Nation" = 'norway (host nation)' AND "Silver" > '0' AND "Total" > '16' | 0.132813 |
CREATE TABLE table_name_75 (time_retired VARCHAR2, qual VARCHAR2)
| Which time/retired has a qual of 144.02? | SELECT time_retired FROM table_name_75 WHERE qual = 144.02 | SELECT "time_retired" FROM "table_name_75" WHERE "qual" = 144.02 | 0.0625 |
CREATE TABLE table_name_71 (extra_laps VARCHAR2, total_points VARCHAR2)
| What is the number of extra laps for 9 total points? | SELECT extra_laps FROM table_name_71 WHERE total_points = "9" | SELECT "extra_laps" FROM "table_name_71" WHERE "9" = "total_points" | 0.06543 |
CREATE TABLE table_12505 ("Player" CLOB, "Country" CLOB, "Year ( s ) won" CLOB, "Total" FLOAT, "To par" CLOB, "Finish" CLOB)
| What total average has 1988 has the year (s) won? | SELECT AVG("Total") FROM table_12505 WHERE "Year(s) won" = '1988' | SELECT AVG("Total") FROM "table_12505" WHERE "Year(s) won" = '1988' | 0.06543 |
CREATE TABLE table_name_98 (loss VARCHAR2, date VARCHAR2)
| Who recorded the loss on august 7? | SELECT loss FROM table_name_98 WHERE date = "august 7" | SELECT "loss" FROM "table_name_98" WHERE "august 7" = "date" | 0.058594 |
CREATE TABLE table_4961 ("Date" FLOAT, "Opponent" CLOB, "Result" CLOB, "Odds" CLOB, "Location" CLOB, "Score" CLOB)
| What was the score for an n/a location with the odds of p + 1? | SELECT "Result" FROM table_4961 WHERE "Location" = 'n/a' AND "Odds" = 'p + 1' | SELECT "Result" FROM "table_4961" WHERE "Location" = 'n/a' AND "Odds" = 'p + 1' | 0.077148 |
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime 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 diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
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 treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
| i mean, how many hours has it been since patient 027-82318 was admitted to the hospital? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '027-82318' AND patient.hospitaldischargetime IS NULL | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', "patient"."hospitaladmittime")) FROM "patient" WHERE "patient"."hospitaldischargetime" IS NULL AND "patient"."uniquepid" = '027-82318' | 0.19043 |
CREATE TABLE table_51336 ("Driver" CLOB, "Constructor" CLOB, "Laps" CLOB, "Time/Retired" CLOB, "Grid" CLOB)
| Which driver had a grid of 22? | SELECT "Driver" FROM table_51336 WHERE "Grid" = '22' | SELECT "Driver" FROM "table_51336" WHERE "Grid" = '22' | 0.052734 |
CREATE TABLE table_72505 ("Position" FLOAT, "Club ( City/Town ) " CLOB, "Games Played" FLOAT, "W-L-D" CLOB, "Goals For/Against" CLOB, "Points" FLOAT)
| what is the minimum points with goals for/against being 8-5 | SELECT MIN("Points") FROM table_72505 WHERE "Goals For/Against" = '8-5' | SELECT MIN("Points") FROM "table_72505" WHERE "Goals For/Against" = '8-5' | 0.071289 |
CREATE TABLE table_2932 ("Player" CLOB, "Position" CLOB, "NASL years" CLOB, "NASL club ( s ) " CLOB, "Accolades ( Pre-NASL ) " CLOB)
| What nasl club won several titles with leeds united? | SELECT "NASL club(s)" FROM table_2932 WHERE "Accolades (Pre-NASL)" = 'Won several titles with Leeds United' | SELECT "NASL club(s)" FROM "table_2932" WHERE "Accolades (Pre-NASL)" = 'Won several titles with Leeds United' | 0.106445 |
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
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 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 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 diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
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 d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title 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 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 chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto 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)
| what is the three most commonly taken test for patients aged 20s? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 3) | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."age" <= 29 AND "admissions"."age" >= 20 GROUP BY "hadm_id"), "t1" AS (SELECT "labevents"."itemid", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS "c1" FROM "labevents" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "labevents"."hadm_id" WHERE NOT "_u_0"."" IS NULL GROUP BY "labevents"."itemid"), "_u_1" AS (SELECT "t1"."itemid" FROM "t1" "t1" WHERE "t1"."c1" <= 3 GROUP BY "itemid") SELECT "d_labitems"."label" FROM "d_labitems" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "d_labitems"."itemid" WHERE NOT "_u_1"."" IS NULL | 0.579102 |
CREATE TABLE channel (Channel_ID NUMBER, Name CLOB, Owner CLOB, Share_in_percent FLOAT, Rating_in_percent FLOAT)
CREATE TABLE program (Program_ID NUMBER, Name CLOB, Origin CLOB, Launch FLOAT, Owner CLOB)
CREATE TABLE broadcast_share (Channel_ID NUMBER, Program_ID NUMBER, Date CLOB, Share_in_percent FLOAT)
CREATE TABLE broadcast (Channel_ID NUMBER, Program_ID NUMBER, Time_of_day CLOB)
| Count the number of programs broadcast for each time section of a day Show bar chart, display X in descending order. | SELECT Time_of_day, COUNT(*) FROM broadcast GROUP BY Time_of_day ORDER BY Time_of_day DESC | SELECT "Time_of_day", COUNT(*) FROM "broadcast" GROUP BY "Time_of_day" ORDER BY "Time_of_day" DESC | 0.095703 |
CREATE TABLE table_19479 ("Date Released" CLOB, "Polling institute" CLOB, "Socialist" CLOB, "Social Democratic" CLOB, "Peoples Party" CLOB, "Green-Communist" CLOB, "Left Bloc" CLOB, "Lead" CLOB)
| How many percentages of Left Bloc correspond to a 32.1% Social Democratic? | SELECT COUNT("Left Bloc") FROM table_19479 WHERE "Social Democratic" = '32.1%' | SELECT COUNT("Left Bloc") FROM "table_19479" WHERE "Social Democratic" = '32.1%' | 0.078125 |
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value 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_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 labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
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 diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime 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 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 inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
| when did patient 3242 have a catheter tip-iv microbiology test for the first time in 01/2104? | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3242) AND microbiologyevents.spec_type_desc = 'catheter tip-iv' AND STRFTIME('%y-%m', microbiologyevents.charttime) = '2104-01' ORDER BY microbiologyevents.charttime LIMIT 1 | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 3242 GROUP BY "hadm_id") SELECT "microbiologyevents"."charttime" FROM "microbiologyevents" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "microbiologyevents"."hadm_id" WHERE "microbiologyevents"."spec_type_desc" = 'catheter tip-iv' AND NOT "_u_0"."" IS NULL AND STRFTIME('%y-%m', "microbiologyevents"."charttime") = '2104-01' ORDER BY "microbiologyevents"."charttime" FETCH FIRST 1 ROWS ONLY | 0.470703 |
CREATE TABLE table_33774 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| What is the away team score when the home team is North Melbourne? | SELECT "Away team score" FROM table_33774 WHERE "Home team" = 'north melbourne' | SELECT "Away team score" FROM "table_33774" WHERE "Home team" = 'north melbourne' | 0.079102 |
CREATE TABLE table_36289 ("Outcome" CLOB, "Date" CLOB, "Tournament" CLOB, "Surface" CLOB, "Opponent" CLOB, "Score" CLOB)
| WHICH Outcome has aN Opponent of pascale paradis-mangon? | SELECT "Outcome" FROM table_36289 WHERE "Opponent" = 'pascale paradis-mangon' | SELECT "Outcome" FROM "table_36289" WHERE "Opponent" = 'pascale paradis-mangon' | 0.077148 |
CREATE TABLE table_name_67 (spike NUMBER, name VARCHAR2, block VARCHAR2)
| What is the average Spike, when Name is Gustavo Porporatto, and when Block is greater than 323? | SELECT AVG(spike) FROM table_name_67 WHERE name = "gustavo porporatto" AND block > 323 | SELECT AVG("spike") FROM "table_name_67" WHERE "block" > 323 AND "gustavo porporatto" = "name" | 0.091797 |
CREATE TABLE table_49710 ("Position" FLOAT, "Name" CLOB, "Played" FLOAT, "Drawn" FLOAT, "Lost" FLOAT, "Points" FLOAT)
| What was the average points for someone who has played more than 10? | SELECT AVG("Points") FROM table_49710 WHERE "Played" > '10' | SELECT AVG("Points") FROM "table_49710" WHERE "Played" > '10' | 0.05957 |
CREATE TABLE table_name_39 (venue VARCHAR2, home_team VARCHAR2)
| What venue is the home of the Carlton team? | SELECT venue FROM table_name_39 WHERE home_team = "carlton" | SELECT "venue" FROM "table_name_39" WHERE "carlton" = "home_team" | 0.063477 |
CREATE TABLE table_204_872 (id NUMBER, "name" CLOB, "completed" CLOB, "architect" CLOB, "location" CLOB, "year of listing & ref ( s ) " NUMBER)
| what is the street of the only building listed in 1989 ? | SELECT "name" FROM table_204_872 WHERE "year of listing & ref(s)" = 1989 | SELECT "name" FROM "table_204_872" WHERE "year of listing & ref(s)" = 1989 | 0.072266 |
CREATE TABLE table_name_30 (record VARCHAR2, date VARCHAR2)
| What is Record, when Date is Oct 19? | SELECT record FROM table_name_30 WHERE date = "oct 19" | SELECT "record" FROM "table_name_30" WHERE "date" = "oct 19" | 0.058594 |
CREATE TABLE table_33570 ("Type" CLOB, "Suffix" CLOB, "Valency change" CLOB, "Example" CLOB, "Meaning" CLOB)
| What is the example with the associative type? | SELECT "Example" FROM table_33570 WHERE "Type" = 'associative' | SELECT "Example" FROM "table_33570" WHERE "Type" = 'associative' | 0.0625 |
CREATE TABLE table_52641 ("Date" CLOB, "Competition" CLOB, "Venue" CLOB, "Result" CLOB, "Score" CLOB, "Goals" CLOB)
| I want the date with the venue of mcalpine stadium | SELECT "Date" FROM table_52641 WHERE "Venue" = 'mcalpine stadium' | SELECT "Date" FROM "table_52641" WHERE "Venue" = 'mcalpine stadium' | 0.06543 |
CREATE TABLE table_name_78 (rank NUMBER, grid VARCHAR2, time_retired VARCHAR2, laps VARCHAR2, qual VARCHAR2)
| What was the rank of the car who had more than 182 laps, gris less than 3, with a qual time of more than 134.14 and a time/retired of +14:21.72? | SELECT MIN(rank) FROM table_name_78 WHERE laps > 182 AND qual > 134.14 AND time_retired = "+14:21.72" AND grid < 3 | SELECT MIN("rank") FROM "table_name_78" WHERE "+14:21.72" = "time_retired" AND "grid" < 3 AND "laps" > 182 AND "qual" > 134.14 | 0.123047 |
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime 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 treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
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 cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
| in 2105 how many patients with s/p surgery for cancer - rectal were diagnosed within the same hospital visit after previously being diagnosed with myocardial infarction ruled out? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p surgery for cancer - rectal' AND STRFTIME('%y', diagnosis.diagnosistime) = '2105') AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'myocardial infarction ruled out' AND STRFTIME('%y', diagnosis.diagnosistime) = '2105') AS t2 WHERE t1.diagnosistime < t2.diagnosistime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid | WITH "t2" AS (SELECT "diagnosis"."diagnosistime", "patient"."patienthealthsystemstayid" FROM "diagnosis" JOIN "patient" ON "diagnosis"."patientunitstayid" = "patient"."patientunitstayid" WHERE "diagnosis"."diagnosisname" = 'myocardial infarction ruled out' AND STRFTIME('%y', "diagnosis"."diagnosistime") = '2105') SELECT COUNT(DISTINCT "patient"."uniquepid") FROM "diagnosis" JOIN "patient" ON "diagnosis"."patientunitstayid" = "patient"."patientunitstayid" JOIN "t2" "t2" ON "diagnosis"."diagnosistime" < "t2"."diagnosistime" AND "patient"."patienthealthsystemstayid" = "t2"."patienthealthsystemstayid" WHERE "diagnosis"."diagnosisname" = 's/p surgery for cancer - rectal' AND STRFTIME('%y', "diagnosis"."diagnosistime") = '2105' | 0.713867 |
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 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 procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| what is the number of patients whose drug name is cyclosporine (sandimmune)? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "CycloSPORINE (Sandimmune)" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "CycloSPORINE (Sandimmune)" = "prescriptions"."drug" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" | 0.196289 |
CREATE TABLE table_16984 ("Series #" FLOAT, "Season #" FLOAT, "Title" CLOB, "Directed by" CLOB, "Written by" CLOB, "Original air date" CLOB, "Production code" FLOAT)
| What is the number of series with production code 503? | SELECT COUNT("Series #") FROM table_16984 WHERE "Production code" = '503' | SELECT COUNT("Series #") FROM "table_16984" WHERE "Production code" = '503' | 0.073242 |
CREATE TABLE table_name_37 (total NUMBER, bask VARCHAR2, base VARCHAR2)
| What is the highest total value when bask and base are each 3? | SELECT MAX(total) FROM table_name_37 WHERE bask = "3" AND base = "3" | SELECT MAX("total") FROM "table_name_37" WHERE "3" = "base" AND "3" = "bask" | 0.074219 |
CREATE TABLE table_60148 ("Opposing Teams" CLOB, "Against" FLOAT, "Date" CLOB, "Venue" CLOB, "Status" CLOB)
| What Venue has a Date of 17/03/1990? | SELECT "Venue" FROM table_60148 WHERE "Date" = '17/03/1990' | SELECT "Venue" FROM "table_60148" WHERE "Date" = '17/03/1990' | 0.05957 |
CREATE TABLE table_45168 ("Game" FLOAT, "Date" CLOB, "Team" CLOB, "Score" CLOB, "High points" CLOB, "High rebounds" CLOB, "High assists" CLOB, "Location Attendance" CLOB, "Record" CLOB)
| How many high assists were on November 27? | SELECT "High assists" FROM table_45168 WHERE "Date" = 'november 27' | SELECT "High assists" FROM "table_45168" WHERE "Date" = 'november 27' | 0.067383 |
CREATE TABLE employee (eid NUMBER, name VARCHAR2, salary NUMBER)
CREATE TABLE aircraft (aid NUMBER, name VARCHAR2, distance NUMBER)
CREATE TABLE certificate (eid NUMBER, aid NUMBER)
CREATE TABLE flight (flno NUMBER, origin VARCHAR2, destination VARCHAR2, distance NUMBER, departure_date DATE, arrival_date DATE, price NUMBER, aid NUMBER)
| Show the number of flights in each destination city with a bar chart. | SELECT destination, COUNT(destination) FROM flight GROUP BY destination | SELECT "destination", COUNT("destination") FROM "flight" GROUP BY "destination" | 0.077148 |
CREATE TABLE table_25403 ("Season" FLOAT, "Episodes" FLOAT, "Timeslot ( ET ) " CLOB, "Season Premiere" CLOB, "Season Finale" CLOB, "TV Season" CLOB, "Rank" CLOB, "Viewers ( in millions ) " CLOB)
| What rank number had a season premiere on December 24, 2011? | SELECT "Rank" FROM table_25403 WHERE "Season Premiere" = 'December 24, 2011' | SELECT "Rank" FROM "table_25403" WHERE "Season Premiere" = 'December 24, 2011' | 0.076172 |
CREATE TABLE table_204_689 (id NUMBER, "year" NUMBER, "title" CLOB, "album" CLOB, "uk" NUMBER, "b-sides" CLOB)
| what is the b side on the only non album single ? | SELECT "b-sides" FROM table_204_689 WHERE "album" = 'non-album single' | SELECT "b-sides" FROM "table_204_689" WHERE "album" = 'non-album single' | 0.070313 |
CREATE TABLE table_71010 ("From" CLOB, "Until" CLOB, "Name" CLOB, "Party" CLOB, "Function" CLOB)
| Which party is associated with a leader who began his tenure on June 13, 2007? | SELECT "Party" FROM table_71010 WHERE "From" = 'june 13, 2007' | SELECT "Party" FROM "table_71010" WHERE "From" = 'june 13, 2007' | 0.0625 |
CREATE TABLE table_2501754_4 (episode__number NUMBER)
| What is the lowest episode number? | SELECT MIN(episode__number) FROM table_2501754_4 | SELECT MIN("episode__number") FROM "table_2501754_4" | 0.050781 |
CREATE TABLE table_23285849_7 (date VARCHAR2, record VARCHAR2)
| What was the date of the game when the record was 27-14? | SELECT date FROM table_23285849_7 WHERE record = "27-14" | SELECT "date" FROM "table_23285849_7" WHERE "27-14" = "record" | 0.060547 |
CREATE TABLE table_name_2 (musical_guest__song_performed_ VARCHAR2, air_date VARCHAR2)
| What is the Musical Guest (Song performed) for the episode aired on 13 july 2008? | SELECT musical_guest__song_performed_ FROM table_name_2 WHERE air_date = "13 july 2008" | SELECT "musical_guest__song_performed_" FROM "table_name_2" WHERE "13 july 2008" = "air_date" | 0.09082 |
CREATE TABLE event (ID NUMBER, Name CLOB, Stadium_ID NUMBER, Year CLOB)
CREATE TABLE swimmer (ID NUMBER, name CLOB, Nationality CLOB, meter_100 FLOAT, meter_200 CLOB, meter_300 CLOB, meter_400 CLOB, meter_500 CLOB, meter_600 CLOB, meter_700 CLOB, Time CLOB)
CREATE TABLE stadium (ID NUMBER, name CLOB, Capacity NUMBER, City CLOB, Country CLOB, Opening_year NUMBER)
CREATE TABLE record (ID NUMBER, Result CLOB, Swimmer_ID NUMBER, Event_ID NUMBER)
| Visualize a bar chart about the distribution of name and ID , and list by the names from high to low. | SELECT name, ID FROM swimmer ORDER BY name DESC | SELECT "name", "ID" FROM "swimmer" ORDER BY "name" DESC | 0.053711 |
CREATE TABLE basketball_match (Team_ID NUMBER, School_ID NUMBER, Team_Name CLOB, ACC_Regular_Season CLOB, ACC_Percent CLOB, ACC_Home CLOB, ACC_Road CLOB, All_Games CLOB, All_Games_Percent NUMBER, All_Home CLOB, All_Road CLOB, All_Neutral CLOB)
CREATE TABLE university (School_ID NUMBER, School CLOB, Location CLOB, Founded FLOAT, Affiliation CLOB, Enrollment FLOAT, Nickname CLOB, Primary_conference CLOB)
| Give me the comparison about All_Games_Percent over the All_Games by a bar chart, could you sort in desc by the Y please? | SELECT All_Games, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC | SELECT "All_Games", "All_Games_Percent" FROM "basketball_match" ORDER BY "All_Games_Percent" DESC | 0.094727 |
CREATE TABLE table_10034 ("Tie no" CLOB, "Home team" CLOB, "Score" CLOB, "Away team" CLOB, "Date" CLOB)
| What is the score when the tie number is 4? | SELECT "Score" FROM table_10034 WHERE "Tie no" = '4' | SELECT "Score" FROM "table_10034" WHERE "Tie no" = '4' | 0.052734 |
CREATE TABLE table_name_5 (city_of_license VARCHAR2, frequency_mhz NUMBER)
| Which city of license has a frequency less than 100.1? | SELECT city_of_license FROM table_name_5 WHERE frequency_mhz < 100.1 | SELECT "city_of_license" FROM "table_name_5" WHERE "frequency_mhz" < 100.1 | 0.072266 |
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
| In Fall 2002 , did Prof. Christopher Odato teach UKRAINE 451 ? | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'UKRAINE' AND course.number = 451 AND instructor.name LIKE '%Christopher Odato%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2002 | SELECT COUNT(*) > 0 FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" JOIN "offering_instructor" ON "course_offering"."offering_id" = "offering_instructor"."offering_id" JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" = 'Fall' AND "semester"."year" = 2002 JOIN "instructor" ON "instructor"."instructor_id" = "offering_instructor"."instructor_id" AND "instructor"."name" LIKE '%Christopher Odato%' WHERE "course"."department" = 'UKRAINE' AND "course"."number" = 451 | 0.546875 |
CREATE TABLE fare_basis (fare_basis_code CLOB, booking_class CLOB, class_type CLOB, premium CLOB, economy CLOB, discounted CLOB, night CLOB, season CLOB, basis_days CLOB)
CREATE TABLE flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type VARCHAR2)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note 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 airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
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 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 flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
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 dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
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 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 food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE aircraft (aircraft_code VARCHAR2, aircraft_description VARCHAR2, manufacturer VARCHAR2, basic_type VARCHAR2, engines NUMBER, propulsion VARCHAR2, wide_body VARCHAR2, wing_span NUMBER, length NUMBER, weight NUMBER, capacity NUMBER, pay_load NUMBER, cruising_speed NUMBER, range_miles NUMBER, pressurized VARCHAR2)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE days (days_code VARCHAR2, day_name VARCHAR2)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
| show me all the flights from TORONTO on NX | 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, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'NX' | SELECT DISTINCT "flight"."flight_id" FROM "airport_service" "AIRPORT_SERVICE_0" JOIN "city" "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'TORONTO' JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" AND "flight"."airline_code" = 'NX' JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" | 0.480469 |
CREATE TABLE table_12997 ("Week" FLOAT, "Date" CLOB, "Opponent" CLOB, "Result" CLOB, "Attendance" CLOB)
| What is the date of the game played after week 4 with 60,658 people in attendance? | SELECT "Date" FROM table_12997 WHERE "Week" > '4' AND "Attendance" = '60,658' | SELECT "Date" FROM "table_12997" WHERE "Attendance" = '60,658' AND "Week" > '4' | 0.077148 |
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 diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| specify the total number of female patients who had personal history of venous thrombosis and embolism | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Personal history of venous thrombosis and embolism" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "Personal history of venous thrombosis and embolism" = "diagnoses"."long_title" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" | 0.214844 |
CREATE TABLE table_name_26 (result VARCHAR2, venue VARCHAR2)
| What is the result of the game played at Jinan? | SELECT result FROM table_name_26 WHERE venue = "jinan" | SELECT "result" FROM "table_name_26" WHERE "jinan" = "venue" | 0.058594 |
CREATE TABLE individuals (individual_id NUMBER, individual_first_name CLOB, individual_middle_name CLOB, inidividual_phone CLOB, individual_email CLOB, individual_address CLOB, individual_last_name CLOB)
CREATE TABLE party_services (booking_id NUMBER, customer_id NUMBER, service_id NUMBER, service_datetime TIME, booking_made_date TIME)
CREATE TABLE organizations (organization_id NUMBER, date_formed TIME, organization_name CLOB, uk_vat_number CLOB)
CREATE TABLE parties (party_id NUMBER, payment_method_code CLOB, party_phone CLOB, party_email CLOB)
CREATE TABLE party_forms (party_id NUMBER, form_id NUMBER, date_completion_started TIME, form_status_code CLOB, date_fully_completed TIME)
CREATE TABLE party_addresses (party_id NUMBER, address_id NUMBER, date_address_from TIME, address_type_code CLOB, date_address_to TIME)
CREATE TABLE forms (form_id NUMBER, form_type_code CLOB, service_id NUMBER, form_number CLOB, form_name CLOB, form_description CLOB)
CREATE TABLE organization_contact_individuals (individual_id NUMBER, organization_id NUMBER, date_contact_from TIME, date_contact_to TIME)
CREATE TABLE services (service_id NUMBER, service_type_code CLOB, service_name CLOB, service_descriptio CLOB)
CREATE TABLE addresses (address_id NUMBER, line_1_number_building CLOB, town_city CLOB, zip_postcode CLOB, state_province_county CLOB, country CLOB)
| What is the last name of the contact individual from the Labour party organization who was contacted most recently? | SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = "Labour Party" ORDER BY t2.date_contact_to DESC LIMIT 1 | SELECT "t3"."individual_last_name" FROM "organizations" "t1" JOIN "organization_contact_individuals" "t2" ON "t1"."organization_id" = "t2"."organization_id" JOIN "individuals" "t3" ON "t2"."individual_id" = "t3"."individual_id" WHERE "Labour Party" = "t1"."organization_name" ORDER BY "t2"."date_contact_to" DESC FETCH FIRST 1 ROWS ONLY | 0.328125 |
CREATE TABLE table_name_88 (density NUMBER, province VARCHAR2, area VARCHAR2)
| What is the highest Density for the independencia province, with an area smaller than 2,007.4? | SELECT MAX(density) FROM table_name_88 WHERE province = "independencia" AND area < 2 OFFSET 007.4 | SELECT MAX("density") FROM "table_name_88" WHERE "area" < 2 AND "independencia" = "province" OFFSET 007.4 ROWS | 0.107422 |
CREATE TABLE table_6952 ("Nation" CLOB, "Skip" CLOB, "Third" CLOB, "Second" CLOB, "Lead" CLOB, "Alternate" CLOB, "Club" CLOB)
| Which club was from Great Britain? | SELECT "Club" FROM table_6952 WHERE "Nation" = 'great britain' | SELECT "Club" FROM "table_6952" WHERE "Nation" = 'great britain' | 0.0625 |
CREATE TABLE home_game (year NUMBER, league_id CLOB, team_id CLOB, park_id CLOB, span_first CLOB, span_last CLOB, games NUMBER, openings NUMBER, attendance NUMBER)
CREATE TABLE college (college_id CLOB, name_full CLOB, city CLOB, state CLOB, country CLOB)
CREATE TABLE manager_half (player_id CLOB, year NUMBER, team_id CLOB, league_id CLOB, inseason NUMBER, half NUMBER, g NUMBER, w NUMBER, l NUMBER, rank NUMBER)
CREATE TABLE manager_award (player_id CLOB, award_id CLOB, year NUMBER, league_id CLOB, tie CLOB, notes NUMBER)
CREATE TABLE team_franchise (franchise_id CLOB, franchise_name CLOB, active CLOB, na_assoc CLOB)
CREATE TABLE player (player_id CLOB, birth_year NUMBER, birth_month NUMBER, birth_day NUMBER, birth_country CLOB, birth_state CLOB, birth_city CLOB, death_year NUMBER, death_month NUMBER, death_day NUMBER, death_country CLOB, death_state CLOB, death_city CLOB, name_first CLOB, name_last CLOB, name_given CLOB, weight NUMBER, height NUMBER, bats CLOB, throws CLOB, debut CLOB, final_game CLOB, retro_id CLOB, bbref_id CLOB)
CREATE TABLE all_star (player_id CLOB, year NUMBER, game_num NUMBER, game_id CLOB, team_id CLOB, league_id CLOB, gp NUMBER, starting_pos NUMBER)
CREATE TABLE salary (year NUMBER, team_id CLOB, league_id CLOB, player_id CLOB, salary NUMBER)
CREATE TABLE fielding_outfield (player_id CLOB, year NUMBER, stint NUMBER, glf NUMBER, gcf NUMBER, grf NUMBER)
CREATE TABLE player_award (player_id CLOB, award_id CLOB, year NUMBER, league_id CLOB, tie CLOB, notes CLOB)
CREATE TABLE fielding (player_id CLOB, year NUMBER, stint NUMBER, team_id CLOB, league_id CLOB, pos CLOB, g NUMBER, gs NUMBER, inn_outs NUMBER, po NUMBER, a NUMBER, e NUMBER, dp NUMBER, pb NUMBER, wp NUMBER, sb NUMBER, cs NUMBER, zr NUMBER)
CREATE TABLE team (year NUMBER, league_id CLOB, team_id CLOB, franchise_id CLOB, div_id CLOB, rank NUMBER, g NUMBER, ghome NUMBER, w NUMBER, l NUMBER, div_win CLOB, wc_win CLOB, lg_win CLOB, ws_win CLOB, r NUMBER, ab NUMBER, h NUMBER, double NUMBER, triple NUMBER, hr NUMBER, bb NUMBER, so NUMBER, sb NUMBER, cs NUMBER, hbp NUMBER, sf NUMBER, ra NUMBER, er NUMBER, era NUMBER, cg NUMBER, sho NUMBER, sv NUMBER, ipouts NUMBER, ha NUMBER, hra NUMBER, bba NUMBER, soa NUMBER, e NUMBER, dp NUMBER, fp NUMBER, name CLOB, park CLOB, attendance NUMBER, bpf NUMBER, ppf NUMBER, team_id_br CLOB, team_id_lahman45 CLOB, team_id_retro CLOB)
CREATE TABLE pitching (player_id CLOB, year NUMBER, stint NUMBER, team_id CLOB, league_id CLOB, w NUMBER, l NUMBER, g NUMBER, gs NUMBER, cg NUMBER, sho NUMBER, sv NUMBER, ipouts NUMBER, h NUMBER, er NUMBER, hr NUMBER, bb NUMBER, so NUMBER, baopp NUMBER, era NUMBER, ibb NUMBER, wp NUMBER, hbp NUMBER, bk NUMBER, bfp NUMBER, gf NUMBER, r NUMBER, sh NUMBER, sf NUMBER, g_idp NUMBER)
CREATE TABLE player_award_vote (award_id CLOB, year NUMBER, league_id CLOB, player_id CLOB, points_won NUMBER, points_max NUMBER, votes_first NUMBER)
CREATE TABLE batting (player_id CLOB, year NUMBER, stint NUMBER, team_id CLOB, league_id CLOB, g NUMBER, ab NUMBER, r NUMBER, h NUMBER, double NUMBER, triple NUMBER, hr NUMBER, rbi NUMBER, sb NUMBER, cs NUMBER, bb NUMBER, so NUMBER, ibb NUMBER, hbp NUMBER, sh NUMBER, sf NUMBER, g_idp NUMBER)
CREATE TABLE batting_postseason (year NUMBER, round CLOB, player_id CLOB, team_id CLOB, league_id CLOB, g NUMBER, ab NUMBER, r NUMBER, h NUMBER, double NUMBER, triple NUMBER, hr NUMBER, rbi NUMBER, sb NUMBER, cs NUMBER, bb NUMBER, so NUMBER, ibb NUMBER, hbp NUMBER, sh NUMBER, sf NUMBER, g_idp NUMBER)
CREATE TABLE player_college (player_id CLOB, college_id CLOB, year NUMBER)
CREATE TABLE postseason (year NUMBER, round CLOB, team_id_winner CLOB, league_id_winner CLOB, team_id_loser CLOB, league_id_loser CLOB, wins NUMBER, losses NUMBER, ties NUMBER)
CREATE TABLE manager_award_vote (award_id CLOB, year NUMBER, league_id CLOB, player_id CLOB, points_won NUMBER, points_max NUMBER, votes_first NUMBER)
CREATE TABLE team_half (year NUMBER, league_id CLOB, team_id CLOB, half NUMBER, div_id CLOB, div_win CLOB, rank NUMBER, g NUMBER, w NUMBER, l NUMBER)
CREATE TABLE fielding_postseason (player_id CLOB, year NUMBER, team_id CLOB, league_id CLOB, round CLOB, pos CLOB, g NUMBER, gs NUMBER, inn_outs NUMBER, po NUMBER, a NUMBER, e NUMBER, dp NUMBER, tp NUMBER, pb NUMBER, sb NUMBER, cs NUMBER)
CREATE TABLE hall_of_fame (player_id CLOB, yearid NUMBER, votedby CLOB, ballots NUMBER, needed NUMBER, votes NUMBER, inducted CLOB, category CLOB, needed_note CLOB)
CREATE TABLE manager (player_id CLOB, year NUMBER, team_id CLOB, league_id CLOB, inseason NUMBER, g NUMBER, w NUMBER, l NUMBER, rank NUMBER, plyr_mgr CLOB)
CREATE TABLE park (park_id CLOB, park_name CLOB, park_alias CLOB, city CLOB, state CLOB, country CLOB)
CREATE TABLE pitching_postseason (player_id CLOB, year NUMBER, round CLOB, team_id CLOB, league_id CLOB, w NUMBER, l NUMBER, g NUMBER, gs NUMBER, cg NUMBER, sho NUMBER, sv NUMBER, ipouts NUMBER, h NUMBER, er NUMBER, hr NUMBER, bb NUMBER, so NUMBER, baopp CLOB, era NUMBER, ibb NUMBER, wp NUMBER, hbp NUMBER, bk NUMBER, bfp NUMBER, gf NUMBER, r NUMBER, sh NUMBER, sf NUMBER, g_idp NUMBER)
CREATE TABLE appearances (year NUMBER, team_id CLOB, league_id CLOB, player_id CLOB, g_all NUMBER, gs NUMBER, g_batting NUMBER, g_defense NUMBER, g_p NUMBER, g_c NUMBER, g_1b NUMBER, g_2b NUMBER, g_3b NUMBER, g_ss NUMBER, g_lf NUMBER, g_cf NUMBER, g_rf NUMBER, g_of NUMBER, g_dh NUMBER, g_ph NUMBER, g_pr NUMBER)
| What is the average number of attendance at home games for each year Plot them as line chart, and could you display year in desc order? | SELECT year, AVG(attendance) FROM home_game GROUP BY year ORDER BY year DESC | SELECT "year", AVG("attendance") FROM "home_game" GROUP BY "year" ORDER BY "year" DESC | 0.083984 |
CREATE TABLE table_29636 ("Season" CLOB, "Episodes" FLOAT, "Timeslot ( EST ) " CLOB, "Season premiere" CLOB, "Season finale" CLOB, "TV season" CLOB, "Rank" CLOB, "Viewers ( in millions ) " CLOB)
| How many season premieres had 15.27 million viewers? | SELECT COUNT("Season premiere") FROM table_29636 WHERE "Viewers (in millions)" = '15.27' | SELECT COUNT("Season premiere") FROM "table_29636" WHERE "Viewers (in millions)" = '15.27' | 0.087891 |
CREATE TABLE table_16824 ("Model name" CLOB, "Power ( ps ) " FLOAT, "Torque ( Nm@rpm ) " CLOB, "Displacement ( cm\\u00b3 ) " FLOAT, "Engine code" CLOB, "Comment" CLOB)
| what's the model name with engine code being b5254 t4 | SELECT "Model name" FROM table_16824 WHERE "Engine code" = 'B5254 T4' | SELECT "Model name" FROM "table_16824" WHERE "Engine code" = 'B5254 T4' | 0.069336 |
CREATE TABLE Participates_in (StuID VARCHAR2)
CREATE TABLE Student (fname VARCHAR2, lname VARCHAR2, StuID VARCHAR2)
| What is the first and last name of the student participating in the most activities? | SELECT T1.fname, T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1 | SELECT "T1"."fname", "T1"."lname" FROM "Student" "T1" JOIN "Participates_in" "T2" ON "T1"."StuID" = "T2"."StuID" GROUP BY "T1"."StuID" ORDER BY COUNT(*) DESC FETCH FIRST 1 ROWS ONLY | 0.176758 |
CREATE TABLE table_80038 ("Country" CLOB, "Film title used in nomination" CLOB, "Language" CLOB, "Original name" CLOB, "Director" CLOB)
| Where is the director Dariush Mehrjui from? | SELECT "Country" FROM table_80038 WHERE "Director" = 'dariush mehrjui' | SELECT "Country" FROM "table_80038" WHERE "Director" = 'dariush mehrjui' | 0.070313 |
CREATE TABLE table_4900 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| When did a home team score 9.9 (63)? | SELECT "Date" FROM table_4900 WHERE "Home team score" = '9.9 (63)' | SELECT "Date" FROM "table_4900" WHERE "Home team score" = '9.9 (63)' | 0.066406 |
CREATE TABLE table_203_762 (id NUMBER, "#" NUMBER, "date" CLOB, "film" CLOB, "gross" CLOB, "notes" CLOB)
| how many films grossed more than $ 80,000,000 | SELECT COUNT("film") FROM table_203_762 WHERE "gross" > 80000000 | SELECT COUNT("film") FROM "table_203_762" WHERE "gross" > 80000000 | 0.064453 |
CREATE TABLE table_name_82 (year VARCHAR2, notes VARCHAR2)
| In what year is the notes distance 1.83m? | SELECT year FROM table_name_82 WHERE notes = "1.83m" | SELECT "year" FROM "table_name_82" WHERE "1.83m" = "notes" | 0.056641 |
CREATE TABLE table_43977 ("City" CLOB, "Korean" CLOB, "Hanja" CLOB, "Province" CLOB, "Population ( 2010 ) " FLOAT)
| What's the Korean word for Pohang? | SELECT "Korean" FROM table_43977 WHERE "City" = 'pohang' | SELECT "Korean" FROM "table_43977" WHERE "City" = 'pohang' | 0.056641 |
CREATE TABLE table_14098_1 (country_or_territory_with_flag VARCHAR2, capital VARCHAR2)
| What country's capital is buenos aires? | SELECT country_or_territory_with_flag FROM table_14098_1 WHERE capital = "Buenos Aires" | SELECT "country_or_territory_with_flag" FROM "table_14098_1" WHERE "Buenos Aires" = "capital" | 0.09082 |
CREATE TABLE table_203_267 (id NUMBER, "no." NUMBER, "song" CLOB, "singers" CLOB, "length ( m:ss ) " CLOB)
| what is the number of songs sung by two singers ? | SELECT COUNT("song") FROM table_203_267 WHERE "singers" >= 2 | SELECT COUNT("song") FROM "table_203_267" WHERE "singers" >= 2 | 0.060547 |
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 d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name 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 d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto 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 patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
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 d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title 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 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 labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
| was po intake given to patient 12775 on the current intensive care unit visit? | SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'po intake' AND d_items.linksto = 'inputevents_cv') | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 12775 GROUP BY "hadm_id"), "_u_1" AS (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "icustays"."hadm_id" WHERE "icustays"."outtime" IS NULL AND NOT "_u_0"."" IS NULL GROUP BY "icustay_id"), "_u_2" AS (SELECT "d_items"."itemid" FROM "d_items" WHERE "d_items"."label" = 'po intake' AND "d_items"."linksto" = 'inputevents_cv' GROUP BY "itemid") SELECT COUNT(*) > 0 FROM "inputevents_cv" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "inputevents_cv"."icustay_id" LEFT JOIN "_u_2" "_u_2" ON "_u_2"."" = "inputevents_cv"."itemid" WHERE NOT "_u_1"."" IS NULL AND NOT "_u_2"."" IS NULL | 0.692383 |
CREATE TABLE table_204_358 (id NUMBER, "species" CLOB, "common name" CLOB, "ncbi accession #" CLOB, "ncbi name" CLOB, "length" CLOB, "sequence identity" CLOB, "sequence similarity" CLOB, "years since divergence from human ( mya ) " NUMBER)
| name the species that has the longest years since divergence from human . | SELECT "species" FROM table_204_358 ORDER BY "years since divergence from human (mya)" DESC LIMIT 1 | SELECT "species" FROM "table_204_358" ORDER BY "years since divergence from human (mya)" DESC FETCH FIRST 1 ROWS ONLY | 0.114258 |
CREATE TABLE table_204_647 (id NUMBER, "year" NUMBER, "film" CLOB, "role" CLOB, "language" CLOB)
| how many films did he release in 2005 ? | SELECT COUNT("film") FROM table_204_647 WHERE "year" = 2005 | SELECT COUNT("film") FROM "table_204_647" WHERE "year" = 2005 | 0.05957 |
CREATE TABLE table_name_68 (attendance NUMBER, home_team VARCHAR2)
| What is the average attendance of the match with arlesey town as the home team? | SELECT AVG(attendance) FROM table_name_68 WHERE home_team = "arlesey town" | SELECT AVG("attendance") FROM "table_name_68" WHERE "arlesey town" = "home_team" | 0.078125 |
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 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 diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| how many patients admitted before the year 2139 undertook drug route nu? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2139" AND prescriptions.route = "NU" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "NU" = "prescriptions"."route" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "2139" > "demographic"."admityear" | 0.214844 |
CREATE TABLE table_54378 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| What was the home team's score at the game held at Junction Oval? | SELECT "Home team score" FROM table_54378 WHERE "Venue" = 'junction oval' | SELECT "Home team score" FROM "table_54378" WHERE "Venue" = 'junction oval' | 0.073242 |
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 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 diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| find the number of patients admitted before the year 2154 who had medicare insurance. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Medicare" AND demographic.admityear < "2154" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "2154" > "demographic"."admityear" AND "Medicare" = "demographic"."insurance" | 0.148438 |
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title 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 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 cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
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_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
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 outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name 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_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
| when was the last time since 591 days ago that patient 16715's respiratory rate was measured greater than 18.0? | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16715)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'respiratory rate' AND d_items.linksto = 'chartevents') AND chartevents.valuenum > 18.0 AND DATETIME(chartevents.charttime) >= DATETIME(CURRENT_TIME(), '-591 day') ORDER BY chartevents.charttime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 16715 GROUP BY "hadm_id"), "_u_1" AS (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "icustays"."hadm_id" WHERE NOT "_u_0"."" IS NULL GROUP BY "icustay_id"), "_u_2" AS (SELECT "d_items"."itemid" FROM "d_items" WHERE "d_items"."label" = 'respiratory rate' AND "d_items"."linksto" = 'chartevents' GROUP BY "itemid") SELECT "chartevents"."charttime" FROM "chartevents" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "chartevents"."icustay_id" LEFT JOIN "_u_2" "_u_2" ON "_u_2"."" = "chartevents"."itemid" WHERE "chartevents"."valuenum" > 18.0 AND DATETIME("chartevents"."charttime") >= DATETIME(CURRENT_TIME(), '-591 day') AND NOT "_u_1"."" IS NULL AND NOT "_u_2"."" IS NULL ORDER BY "chartevents"."charttime" DESC FETCH FIRST 1 ROWS ONLY | 0.84375 |
CREATE TABLE table_3481 ("Episode #" FLOAT, "Series #" FLOAT, "Title" CLOB, "Director" CLOB, "Writer" CLOB, "Original airdate" CLOB, "Viewers ( in millions ) " CLOB)
| What is the original airdate of the episode titled 'Taking it on the Chin'? | SELECT "Original airdate" FROM table_3481 WHERE "Title" = 'Taking It on the Chin' | SELECT "Original airdate" FROM "table_3481" WHERE "Title" = 'Taking It on the Chin' | 0.081055 |
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 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 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)
| how many patients with elective admission type were born before the year 2107? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2107" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "2107" > "demographic"."admityear" AND "ELECTIVE" = "demographic"."admission_type" | 0.15332 |
CREATE TABLE table_1341640_11 (first_elected NUMBER, district VARCHAR2)
| What is the earliest first elected for district georgia 1? | SELECT MIN(first_elected) FROM table_1341640_11 WHERE district = "Georgia 1" | SELECT MIN("first_elected") FROM "table_1341640_11" WHERE "Georgia 1" = "district" | 0.080078 |
CREATE TABLE table_1545 ("Rank" FLOAT, "Company" CLOB, "Headquarters" CLOB, "Industry" CLOB, "Sales ( billion $ ) " CLOB, "Profits ( billion $ ) " CLOB, "Assets ( billion $ ) " CLOB, "Market Value ( billion $ ) " CLOB)
| What are the assets for company who's headquarters are located in Brazil? | SELECT "Assets (billion $)" FROM table_1545 WHERE "Headquarters" = 'Brazil' | SELECT "Assets (billion $)" FROM "table_1545" WHERE "Headquarters" = 'Brazil' | 0.075195 |
CREATE TABLE table_27256 ("Rank" FLOAT, "WS Points" FLOAT, "Name" CLOB, "Country" CLOB, "09-10 I/O best" FLOAT, "09-10 GP/JGP best" FLOAT, "09-10 GP/JGP 2nd" FLOAT, "09-10 OI best" FLOAT, "09-10 OI 2nd" FLOAT, "08-09 I/O best" FLOAT, "08-09 GP/JGP best" FLOAT, "08-09 GP/JGP 2nd" FLOAT, "08-09 OI best" FLOAT, "08-09 OI 2nd" FLOAT)
| If the 08-09 gp/jgp 2nd is bigger than 227.0 and the 08-09 gp/jgp best is 252, what is the 08-09 oi best? | SELECT "08-09 OI best" FROM table_27256 WHERE "08-09 GP/JGP best" = '252' AND "08-09 GP/JGP 2nd" > '227.0' | SELECT "08-09 OI best" FROM "table_27256" WHERE "08-09 GP/JGP 2nd" > '227.0' AND "08-09 GP/JGP best" = '252' | 0.105469 |
CREATE TABLE table_75230 ("Season" CLOB, "Oberliga Bayern" CLOB, "Oberliga Hessen" CLOB, "Oberliga Baden-W\\u00fcrttemberg" CLOB, "Oberliga S\\u00fcdwest" CLOB)
| Which Oberliga Bayern has a Season of 1981-82? | SELECT "Oberliga Bayern" FROM table_75230 WHERE "Season" = '1981-82' | SELECT "Oberliga Bayern" FROM "table_75230" WHERE "Season" = '1981-82' | 0.068359 |
CREATE TABLE table_71540 ("Date" CLOB, "Opponent" CLOB, "Score" CLOB, "Loss" CLOB, "Attendance" CLOB)
| What was the attendance at the game that had a loss of Mercker (3-1)? | SELECT "Attendance" FROM table_71540 WHERE "Loss" = 'mercker (3-1)' | SELECT "Attendance" FROM "table_71540" WHERE "Loss" = 'mercker (3-1)' | 0.067383 |
CREATE TABLE table_29156 ("No. in series" FLOAT, "No. in season" FLOAT, "Title" CLOB, "Directed by" CLOB, "Written by" CLOB, "Original air date" CLOB, "U.S. viewers ( million ) " CLOB)
| How many viewers in millions did the Alison McDonald episode get? | SELECT "U.S. viewers (million)" FROM table_29156 WHERE "Written by" = 'Alison McDonald' | SELECT "U.S. viewers (million)" FROM "table_29156" WHERE "Written by" = 'Alison McDonald' | 0.086914 |
CREATE TABLE table_10354 ("Name" CLOB, "Team" CLOB, "Qual 1" CLOB, "Qual 2" CLOB, "Best" CLOB)
| What is the time for the second qualification where the first qualification time was 1:21.523? | SELECT "Qual 2" FROM table_10354 WHERE "Qual 1" = '1:21.523' | SELECT "Qual 2" FROM "table_10354" WHERE "Qual 1" = '1:21.523' | 0.060547 |
CREATE TABLE table_name_26 (peak VARCHAR2, prom__m_ NUMBER)
| Tell me the peak for prom being less than 147 | SELECT peak FROM table_name_26 WHERE prom__m_ < 147 | SELECT "peak" FROM "table_name_26" WHERE "prom__m_" < 147 | 0.055664 |
CREATE TABLE days (days_code VARCHAR2, day_name 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 flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE aircraft (aircraft_code VARCHAR2, aircraft_description VARCHAR2, manufacturer VARCHAR2, basic_type VARCHAR2, engines NUMBER, propulsion VARCHAR2, wide_body VARCHAR2, wing_span NUMBER, length NUMBER, weight NUMBER, capacity NUMBER, pay_load NUMBER, cruising_speed NUMBER, range_miles NUMBER, pressurized VARCHAR2)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type VARCHAR2)
CREATE TABLE 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 airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE restriction (restriction_code CLOB, advance_purchase NUMBER, stopovers CLOB, saturday_stay_required CLOB, minimum_stay NUMBER, maximum_stay NUMBER, application CLOB, no_discounts CLOB)
CREATE TABLE 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 time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
CREATE TABLE flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code 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 state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description 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 city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note CLOB)
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
| show me all flights between SAN FRANCISCO and PHILADELPHIA on 9 15 with departure time after 12pm | 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 ((date_day.day_number = 15 AND date_day.month_number = 9 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time > 1200 AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | SELECT DISTINCT "flight"."flight_id" FROM "airport_service" "AIRPORT_SERVICE_0" JOIN "date_day" ON "date_day"."day_number" = 15 AND "date_day"."month_number" = 9 AND "date_day"."year" = 1991 JOIN "city" "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'SAN FRANCISCO' 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"."departure_time" > 1200 JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'PHILADELPHIA' | 0.740234 |
Subsets and Splits