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 customers (customer_id NUMBER, customer_first_name CLOB, customer_middle_initial CLOB, customer_last_name CLOB, gender CLOB, email_address CLOB, login_name CLOB, login_password CLOB, phone_number CLOB, town_city CLOB, state_county_province CLOB, country CLOB)
CREATE TABLE invoices (invoice_number NUMBER, order_id NUMBER, invoice_date TIME)
CREATE TABLE order_items (order_item_id NUMBER, order_id NUMBER, product_id NUMBER, product_quantity CLOB, other_order_item_details CLOB)
CREATE TABLE financial_transactions (transaction_id NUMBER, account_id NUMBER, invoice_number NUMBER, transaction_type CLOB, transaction_date TIME, transaction_amount NUMBER, transaction_comment CLOB, other_transaction_details CLOB)
CREATE TABLE products (product_id NUMBER, parent_product_id NUMBER, production_type_code CLOB, unit_price NUMBER, product_name CLOB, product_color CLOB, product_size CLOB)
CREATE TABLE orders (order_id NUMBER, customer_id NUMBER, date_order_placed TIME, order_details CLOB)
CREATE TABLE product_categories (production_type_code CLOB, product_type_description CLOB, vat_rating NUMBER)
CREATE TABLE invoice_line_items (order_item_id NUMBER, invoice_number NUMBER, product_id NUMBER, product_title CLOB, product_quantity CLOB, product_price NUMBER, derived_product_cost NUMBER, derived_vat_payable NUMBER, derived_total_cost NUMBER)
CREATE TABLE accounts (account_id NUMBER, customer_id NUMBER, date_account_opened TIME, account_name CLOB, other_account_details CLOB)
| How many transaction does account with name 337 have? | SELECT COUNT(*) FROM financial_transactions AS T1 JOIN accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = "337" | SELECT COUNT(*) FROM "financial_transactions" "T1" JOIN "accounts" "T2" ON "337" = "T2"."account_name" AND "T1"."account_id" = "T2"."account_id" | 0.140625 |
CREATE TABLE table_name_84 (floors NUMBER, name VARCHAR2)
| Which Floors is the highest one that has a Name of one indiana square? | SELECT MAX(floors) FROM table_name_84 WHERE name = "one indiana square" | SELECT MAX("floors") FROM "table_name_84" WHERE "name" = "one indiana square" | 0.075195 |
CREATE TABLE university (School_ID NUMBER, School CLOB, Location CLOB, Founded FLOAT, Affiliation CLOB, Enrollment FLOAT, Nickname CLOB, Primary_conference CLOB)
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)
| Return a scatter chart about the correlation between Team_ID and School_ID , and group by attribute ACC_Road. | SELECT Team_ID, School_ID FROM basketball_match GROUP BY ACC_Road | SELECT "Team_ID", "School_ID" FROM "basketball_match" GROUP BY "ACC_Road" | 0.071289 |
CREATE TABLE table_27070 ("Team" CLOB, "Hosted" FLOAT, "Average" FLOAT, "Highest" FLOAT, "Lowest" FLOAT, "Total" FLOAT, "Last Year" FLOAT, "Up/Down" CLOB)
| What is the last year total for the team with a lowest of 23578? | SELECT MAX("Last Year") FROM table_27070 WHERE "Lowest" = '23578' | SELECT MAX("Last Year") FROM "table_27070" WHERE "Lowest" = '23578' | 0.06543 |
CREATE TABLE table_32445 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| Which away team played against the home team of St Kilda? | SELECT "Away team" FROM table_32445 WHERE "Home team" = 'st kilda' | SELECT "Away team" FROM "table_32445" WHERE "Home team" = 'st kilda' | 0.066406 |
CREATE TABLE table_11728 ("Date" CLOB, "Visitor" CLOB, "Score" CLOB, "Home" CLOB, "Record" CLOB)
| When was the record 3-14-6? | SELECT "Date" FROM table_11728 WHERE "Record" = '3-14-6' | SELECT "Date" FROM "table_11728" WHERE "Record" = '3-14-6' | 0.056641 |
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
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 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 (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 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 ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE flight_stop (flight_id NUMBER, stop_number NUMBER, stop_days CLOB, stop_airport CLOB, arrival_time NUMBER, arrival_airline CLOB, arrival_flight_number NUMBER, departure_time NUMBER, departure_airline CLOB, departure_flight_number NUMBER, stop_time NUMBER)
CREATE TABLE airport (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 flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE aircraft (aircraft_code VARCHAR2, aircraft_description VARCHAR2, manufacturer VARCHAR2, basic_type VARCHAR2, engines NUMBER, propulsion VARCHAR2, wide_body VARCHAR2, wing_span NUMBER, length NUMBER, weight NUMBER, capacity NUMBER, pay_load NUMBER, cruising_speed NUMBER, range_miles NUMBER, pressurized VARCHAR2)
CREATE TABLE 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 flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_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)
| what does it cost to fly from BOSTON to SAN FRANCISCO on UA flight 21 | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (((flight.airline_code = 'UA') AND flight.flight_number = 21) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | SELECT DISTINCT "fare"."fare_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" = 'BOSTON' JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" AND "flight"."airline_code" = 'UA' AND "flight"."flight_number" = 21 JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "flight_fare" ON "flight"."flight_id" = "flight_fare"."flight_id" JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'SAN FRANCISCO' JOIN "fare" ON "fare"."fare_id" = "flight_fare"."fare_id" | 0.676758 |
CREATE TABLE table_26419467_1 (alumni VARCHAR2, original_season VARCHAR2)
| What alumni were in rw: cancun as their original season? | SELECT alumni FROM table_26419467_1 WHERE original_season = "RW: Cancun" | SELECT "alumni" FROM "table_26419467_1" WHERE "RW: Cancun" = "original_season" | 0.076172 |
CREATE TABLE table_203_490 (id NUMBER, "date" CLOB, "opponent#" CLOB, "rank#" CLOB, "site" CLOB, "result" CLOB, "attendance" NUMBER)
| number of wins in the season . | SELECT COUNT(*) FROM table_203_490 WHERE "result" = 'w' | SELECT COUNT(*) FROM "table_203_490" WHERE "result" = 'w' | 0.055664 |
CREATE TABLE table_name_46 (howard_baker VARCHAR2, ronald_reagan VARCHAR2)
| Name the howard baker for ronald reagan of 72% | SELECT howard_baker FROM table_name_46 WHERE ronald_reagan = "72%" | SELECT "howard_baker" FROM "table_name_46" WHERE "72%" = "ronald_reagan" | 0.070313 |
CREATE TABLE table_25485 ("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 rebounds were there on April 7? | SELECT COUNT("High rebounds") FROM table_25485 WHERE "Date" = 'April 7' | SELECT COUNT("High rebounds") FROM "table_25485" WHERE "Date" = 'April 7' | 0.071289 |
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college 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_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE area (course_id NUMBER, area 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 jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
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 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 comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
| Are ARTDES 100 classes given in the morning ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'ARTDES' AND course.number = 100 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | SELECT COUNT(*) > 0 FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" AND "course_offering"."start_time" < '12:00:00' AND "course_offering"."start_time" >= '08:00:00' JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" = 'WN' AND "semester"."year" = 2016 WHERE "course"."department" = 'ARTDES' AND "course"."number" = 100 | 0.40332 |
CREATE TABLE table_10590 ("Album" CLOB, "Title" CLOB, "Language" CLOB, "Year of Release" FLOAT, "Label ( s ) " CLOB)
| What is the earliest year of release for the album labelled ? | SELECT MIN("Year of Release") FROM table_10590 WHERE "Label(s)" = '艺能动音' | SELECT MIN("Year of Release") FROM "table_10590" WHERE "Label(s)" = '艺能动音' | 0.072266 |
CREATE TABLE table_16269 ("Year" FLOAT, "Network" CLOB, "Host" CLOB, "Pre-race analyst" CLOB, "Lap-by-lap" CLOB, "Color commentator ( s ) " CLOB, "Pit reporters" CLOB)
| How many pre-race analysis occur when Allen Bestwick does the lap-by-lap? | SELECT COUNT("Pre-race analyst") FROM table_16269 WHERE "Lap-by-lap" = 'Allen Bestwick' | SELECT COUNT("Pre-race analyst") FROM "table_16269" WHERE "Lap-by-lap" = 'Allen Bestwick' | 0.086914 |
CREATE TABLE table_1918850_2 (championship VARCHAR2, opponents_in_the_final VARCHAR2)
| which championship had arantxa s nchez vicario todd woodbridge as opponents in the final | SELECT championship FROM table_1918850_2 WHERE opponents_in_the_final = "Arantxa Sánchez Vicario Todd Woodbridge" | SELECT "championship" FROM "table_1918850_2" WHERE "Arantxa Sánchez Vicario Todd Woodbridge" = "opponents_in_the_final" | 0.116211 |
CREATE TABLE table_train_275 ("id" NUMBER, "systolic_blood_pressure_sbp" NUMBER, "hemoglobin_a1c_hba1c" FLOAT, "hba1c" FLOAT, "body_mass_index_bmi" FLOAT, "triglyceride_tg" FLOAT, "age" FLOAT, "NOUSE" FLOAT)
| age < 18 or > 80 years | SELECT * FROM table_train_275 WHERE age < 18 OR age > 80 | SELECT * FROM "table_train_275" WHERE "age" < 18 OR "age" > 80 | 0.060547 |
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)
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)
| provide the number of patients whose ethnicity is white - russian and days of hospital stay is greater than 34? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.days_stay > "34" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "34" < "demographic"."days_stay" AND "WHITE - RUSSIAN" = "demographic"."ethnicity" | 0.15332 |
CREATE TABLE table_5887 ("Year" FLOAT, "Men's singles" CLOB, "Women's singles" CLOB, "Men's doubles" CLOB, "Women's doubles" CLOB, "Mixed doubles" CLOB)
| Men's singles of kilian pfister, and a Women's doubles of astrid eidenbenz claudia jehle has what average year? | SELECT AVG("Year") FROM table_5887 WHERE "Men's singles" = 'kilian pfister' AND "Women's doubles" = 'astrid eidenbenz claudia jehle' | SELECT AVG("Year") FROM "table_5887" WHERE "Men's singles" = 'kilian pfister' AND "Women's doubles" = 'astrid eidenbenz claudia jehle' | 0.130859 |
CREATE TABLE table_27302 ("Team" CLOB, "#" FLOAT, "Primary Sponsor" CLOB, "Driver ( s ) " CLOB, "Listed Owner ( s ) " CLOB, "Engine" CLOB, "Chassis" CLOB)
| What kind of chassis on the angie's list sponsored car? | SELECT "Chassis" FROM table_27302 WHERE "Primary Sponsor" = 'Angie''s List' | SELECT "Chassis" FROM "table_27302" WHERE "Primary Sponsor" = 'Angie''s List' | 0.075195 |
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 vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime 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 microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
| when had patient 005-46456 last had urine output on last month/01? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-46456')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.celllabel = 'urine' AND DATETIME(intakeoutput.intakeoutputtime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', intakeoutput.intakeoutputtime) = '01' ORDER BY intakeoutput.intakeoutputtime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '005-46456' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "intakeoutput"."intakeoutputtime" FROM "intakeoutput" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "intakeoutput"."patientunitstayid" WHERE "intakeoutput"."celllabel" = 'urine' AND "intakeoutput"."cellpath" LIKE '%output%' AND DATETIME("intakeoutput"."intakeoutputtime", 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND NOT "_u_1"."" IS NULL AND STRFTIME('%d', "intakeoutput"."intakeoutputtime") = '01' ORDER BY "intakeoutput"."intakeoutputtime" DESC FETCH FIRST 1 ROWS ONLY | 0.839844 |
CREATE TABLE table_name_2 (population__2007_ VARCHAR2, population__2010_ NUMBER)
| WHAT IS THE POPULATION OF 2007 WHEN 2010 POPULATION WAS SMALLER THAN 1282? | SELECT COUNT(population__2007_) FROM table_name_2 WHERE population__2010_ < 1282 | SELECT COUNT("population__2007_") FROM "table_name_2" WHERE "population__2010_" < 1282 | 0.083984 |
CREATE TABLE table_74512 ("Year" FLOAT, "English title" CLOB, "Original title" CLOB, "Country" CLOB, "Director" CLOB)
| Tell me the country for julian schnabel | SELECT "Country" FROM table_74512 WHERE "Director" = 'julian schnabel' | SELECT "Country" FROM "table_74512" WHERE "Director" = 'julian schnabel' | 0.070313 |
CREATE TABLE table_1342379_45 (first_elected NUMBER)
| What year was someone first elected? | SELECT MIN(first_elected) FROM table_1342379_45 | SELECT MIN("first_elected") FROM "table_1342379_45" | 0.049805 |
CREATE TABLE table_name_41 (song VARCHAR2, place NUMBER)
| What song placed higher than#4? | SELECT song FROM table_name_41 WHERE place > 4 | SELECT "song" FROM "table_name_41" WHERE "place" > 4 | 0.050781 |
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 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 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 cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE d_icd_procedures (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 d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE 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 labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
| what is the top four most frequently performed microbiology tests for patients who receive inject into thorax cavit since 2103 that follow during the same hospital visit? | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject into thorax cavit') AND STRFTIME('%y', procedures_icd.charttime) >= '2103') AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id WHERE STRFTIME('%y', microbiologyevents.charttime) >= '2103') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 4 | WITH "t2" AS (SELECT "admissions"."subject_id", "microbiologyevents"."spec_type_desc", "microbiologyevents"."charttime", "admissions"."hadm_id" FROM "microbiologyevents" JOIN "admissions" ON "admissions"."hadm_id" = "microbiologyevents"."hadm_id" WHERE STRFTIME('%y', "microbiologyevents"."charttime") >= '2103'), "t3" AS (SELECT "t2"."spec_type_desc", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS "c1" FROM "procedures_icd" JOIN "d_icd_procedures" ON "d_icd_procedures"."icd9_code" = "procedures_icd"."icd9_code" AND "d_icd_procedures"."short_title" = 'inject into thorax cavit' JOIN "admissions" ON "admissions"."hadm_id" = "procedures_icd"."hadm_id" JOIN "t2" "t2" ON "admissions"."hadm_id" = "t2"."hadm_id" AND "admissions"."subject_id" = "t2"."subject_id" AND "procedures_icd"."charttime" < "t2"."charttime" WHERE STRFTIME('%y', "procedures_icd"."charttime") >= '2103' GROUP BY "t2"."spec_type_desc") SELECT "t3"."spec_type_desc" FROM "t3" "t3" WHERE "t3"."c1" <= 4 | 0.948242 |
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
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 diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
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 vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
| did patient 027-165214 receive a laboratory test since 172 months ago? | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-165214')) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-172 month') | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '027-165214' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT COUNT(*) > 0 FROM "lab" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "lab"."patientunitstayid" WHERE DATETIME("lab"."labresulttime") >= DATETIME(CURRENT_TIME(), '-172 month') AND NOT "_u_1"."" IS NULL | 0.543945 |
CREATE TABLE greatermanchestercrime (crimeid CLOB, crimets TIME, location CLOB, lsoa CLOB, type CLOB, outcome CLOB)
| What is the crime rate for Eden Street area? | SELECT COUNT(*) FROM greatermanchestercrime WHERE location LIKE "%Eden Street%" | SELECT COUNT(*) FROM "greatermanchestercrime" WHERE "location" LIKE "%Eden Street%" | 0.081055 |
CREATE TABLE table_train_97 ("id" NUMBER, "pulmonary_disease" BOOLEAN, "systolic_blood_pressure_sbp" NUMBER, "diabetic" CLOB, "psychiatric_disease" BOOLEAN, "hematologic_disease" BOOLEAN, "diastolic_blood_pressure_dbp" NUMBER, "lung_disease" BOOLEAN, "NOUSE" FLOAT)
| significant or uncontrolled psychiatric disease | SELECT * FROM table_train_97 WHERE psychiatric_disease = 1 | SELECT * FROM "table_train_97" WHERE "psychiatric_disease" = 1 | 0.060547 |
CREATE TABLE table_13224 ("Position" FLOAT, "Club" CLOB, "Games played" FLOAT, "Wins" FLOAT, "Draws" FLOAT, "Loses" FLOAT, "Goals scored" FLOAT, "Goals conceded" FLOAT, "Points" FLOAT)
| Which Games played has a Points of 6, and Goals scored larger than 12? | SELECT MAX("Games played") FROM table_13224 WHERE "Points" = '6' AND "Goals scored" > '12' | SELECT MAX("Games played") FROM "table_13224" WHERE "Goals scored" > '12' AND "Points" = '6' | 0.089844 |
CREATE TABLE band (id NUMBER, firstname CLOB, lastname CLOB)
CREATE TABLE performance (songid NUMBER, bandmate NUMBER, stageposition CLOB)
CREATE TABLE vocals (songid NUMBER, bandmate NUMBER, type CLOB)
CREATE TABLE songs (songid NUMBER, title CLOB)
CREATE TABLE albums (aid NUMBER, title CLOB, year NUMBER, label CLOB, type CLOB)
CREATE TABLE tracklists (albumid NUMBER, position NUMBER, songid NUMBER)
CREATE TABLE instruments (songid NUMBER, bandmateid NUMBER, instrument CLOB)
| What is the last name of the artist who sang the most songs? | SELECT T2.lastname FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 | SELECT "T2"."lastname" FROM "performance" "T1" JOIN "band" "T2" ON "T1"."bandmate" = "T2"."id" JOIN "songs" "T3" ON "T1"."songid" = "T3"."songid" GROUP BY "lastname" ORDER BY COUNT(*) DESC FETCH FIRST 1 ROWS ONLY | 0.207031 |
CREATE TABLE Rooms (RoomId CLOB, roomName CLOB, beds NUMBER, bedType CLOB, maxOccupancy NUMBER, basePrice NUMBER, decor CLOB)
CREATE TABLE Reservations (Code NUMBER, Room CLOB, CheckIn CLOB, CheckOut CLOB, Rate FLOAT, LastName CLOB, FirstName CLOB, Adults NUMBER, Kids NUMBER)
| Show me the average of baseprice by bedtype in a histogram, and could you sort in ascending by the bars? | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY bedType | SELECT "bedType", AVG("basePrice") FROM "Rooms" GROUP BY "bedType" ORDER BY "bedType" | 0.083008 |
CREATE TABLE table_53130 ("Record" CLOB, "Date" CLOB, "Driver" CLOB, "Time" CLOB, "Speed/Avg. Speed" CLOB)
| Who holds the record time of 24.521 and where was it made? | SELECT "Record" FROM table_53130 WHERE "Time" = '24.521' | SELECT "Record" FROM "table_53130" WHERE "Time" = '24.521' | 0.056641 |
CREATE TABLE table_63056 ("Rank" FLOAT, "Lane" FLOAT, "Athlete" CLOB, "Country" CLOB, "Time" FLOAT, "React" FLOAT)
| What is the average react of the athlete with a time less than 22.29 and a rank greater than 1? | SELECT AVG("React") FROM table_63056 WHERE "Time" < '22.29' AND "Rank" > '1' | SELECT AVG("React") FROM "table_63056" WHERE "Rank" > '1' AND "Time" < '22.29' | 0.076172 |
CREATE TABLE table_77353 ("Week" FLOAT, "Date" CLOB, "Opponent" CLOB, "Result" CLOB, "Game site" CLOB, "Record" CLOB, "Attendance" FLOAT)
| On what date was the result w 28 7? | SELECT "Date" FROM table_77353 WHERE "Result" = 'w 28–7' | SELECT "Date" FROM "table_77353" WHERE "Result" = 'w 28–7' | 0.056641 |
CREATE TABLE table_41069 ("Television service" CLOB, "Country" CLOB, "Language" CLOB, "Content" CLOB, "HDTV" CLOB, "Package/Option" CLOB)
| What is Television Service, when Package/Option is Sky Famiglia, and when Language is Italian? | SELECT "Television service" FROM table_41069 WHERE "Package/Option" = 'sky famiglia' AND "Language" = 'italian' | SELECT "Television service" FROM "table_41069" WHERE "Language" = 'italian' AND "Package/Option" = 'sky famiglia' | 0.110352 |
CREATE TABLE film_actor (actor_id VARCHAR2)
CREATE TABLE actor (first_name VARCHAR2, last_name VARCHAR2, actor_id VARCHAR2)
| Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name. | SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30 | SELECT "T2"."first_name", "T2"."last_name" FROM "film_actor" "T1" JOIN "actor" "T2" ON "T1"."actor_id" = "T2"."actor_id" GROUP BY "T2"."actor_id" HAVING COUNT(*) > 30 | 0.162109 |
CREATE TABLE table_204_74 (id NUMBER, "#" NUMBER, "title" CLOB, "producers" CLOB, "guest performers" CLOB, "length" CLOB)
| what is the number of tracks featuring 2pac ? | SELECT COUNT("title") FROM table_204_74 WHERE "guest performers" = '2pac' | SELECT COUNT("title") FROM "table_204_74" WHERE "guest performers" = '2pac' | 0.073242 |
CREATE TABLE table_name_82 (venue VARCHAR2, home_team VARCHAR2)
| What is Fitzroy's home field? | SELECT venue FROM table_name_82 WHERE home_team = "fitzroy" | SELECT "venue" FROM "table_name_82" WHERE "fitzroy" = "home_team" | 0.063477 |
CREATE TABLE table_25692 ("Player" CLOB, "Games Played" FLOAT, "Minutes" FLOAT, "Field Goals" FLOAT, "Three Pointers" FLOAT, "Free Throws" FLOAT, "Rebounds" FLOAT, "Assists" FLOAT, "Blocks" FLOAT, "Steals" FLOAT, "Points" FLOAT)
| Name the most three pointers for dewanna bonner | SELECT MAX("Three Pointers") FROM table_25692 WHERE "Player" = 'DeWanna Bonner' | SELECT MAX("Three Pointers") FROM "table_25692" WHERE "Player" = 'DeWanna Bonner' | 0.079102 |
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
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 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)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
| tell me the yearly maximum amount of enteral flushes in patient 030-52395's body until 949 days ago? | SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52395')) AND intakeoutput.celllabel = 'enteral flushes' AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime) <= DATETIME(CURRENT_TIME(), '-949 day') GROUP BY STRFTIME('%y', intakeoutput.intakeoutputtime) | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '030-52395' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT MAX("intakeoutput"."cellvaluenumeric") FROM "intakeoutput" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "intakeoutput"."patientunitstayid" WHERE "intakeoutput"."celllabel" = 'enteral flushes' AND "intakeoutput"."cellpath" LIKE '%intake%' AND DATETIME("intakeoutput"."intakeoutputtime") <= DATETIME(CURRENT_TIME(), '-949 day') AND NOT "_u_1"."" IS NULL GROUP BY STRFTIME('%y', "intakeoutput"."intakeoutputtime") | 0.748047 |
CREATE TABLE table_14195 ("Date" CLOB, "Venue" CLOB, "Score" CLOB, "Result" CLOB, "Competition" CLOB)
| what is the result on september 10, 2008? | SELECT "Result" FROM table_14195 WHERE "Date" = 'september 10, 2008' | SELECT "Result" FROM "table_14195" WHERE "Date" = 'september 10, 2008' | 0.068359 |
CREATE TABLE table_name_18 (club VARCHAR2, losing_bonus VARCHAR2)
| Which Club has 1 Losing bonus? | SELECT club FROM table_name_18 WHERE losing_bonus = "1" | SELECT "club" FROM "table_name_18" WHERE "1" = "losing_bonus" | 0.05957 |
CREATE TABLE table_74139 ("Game" FLOAT, "November" FLOAT, "Opponent" CLOB, "Score" CLOB, "Location/Attendance" CLOB, "Record" CLOB, "Points" FLOAT)
| what is the record for score 1-3? | SELECT "Record" FROM table_74139 WHERE "Score" = '1-3' | SELECT "Record" FROM "table_74139" WHERE "Score" = '1-3' | 0.054688 |
CREATE TABLE table_name_91 (team_2 VARCHAR2)
| What is the 1st leg when team 2 is Asil Lysi? | SELECT 1 AS st_leg FROM table_name_91 WHERE team_2 = "asil lysi" | SELECT 1 AS "st_leg" FROM "table_name_91" WHERE "asil lysi" = "team_2" | 0.068359 |
CREATE TABLE table_name_94 (us_cham_rank NUMBER, next_highest_spender VARCHAR2, year VARCHAR2)
| Which US Cham Rank is the lowest one that has a Next Highest Spender of national assn of realtors, and a Year smaller than 2012? | SELECT MIN(us_cham_rank) FROM table_name_94 WHERE next_highest_spender = "national assn of realtors" AND year < 2012 | SELECT MIN("us_cham_rank") FROM "table_name_94" WHERE "national assn of realtors" = "next_highest_spender" AND "year" < 2012 | 0.121094 |
CREATE TABLE table_name_8 (Id VARCHAR2)
| what is the listing for 2012 when 2004 is more than 0, 2008 is more than 1 1994 is 8 and 2005 is less than 11? | SELECT MIN(2012) FROM table_name_8 WHERE 2004 > 0 AND 2008 > 1 AND 1994 = 8 AND 2005 < 11 | SELECT MIN(2012) FROM "table_name_8" WHERE FALSE | 0.046875 |
CREATE TABLE table_name_4 (school VARCHAR2, team VARCHAR2)
| What school did the player drafted for the New York Mets attend? | SELECT school FROM table_name_4 WHERE team = "new york mets" | SELECT "school" FROM "table_name_4" WHERE "new york mets" = "team" | 0.064453 |
CREATE TABLE weather (date CLOB, max_temperature_f NUMBER, mean_temperature_f NUMBER, min_temperature_f NUMBER, max_dew_point_f NUMBER, mean_dew_point_f NUMBER, min_dew_point_f NUMBER, max_humidity NUMBER, mean_humidity NUMBER, min_humidity NUMBER, max_sea_level_pressure_inches NUMBER, mean_sea_level_pressure_inches NUMBER, min_sea_level_pressure_inches NUMBER, max_visibility_miles NUMBER, mean_visibility_miles NUMBER, min_visibility_miles NUMBER, max_wind_Speed_mph NUMBER, mean_wind_speed_mph NUMBER, max_gust_speed_mph NUMBER, precipitation_inches NUMBER, cloud_cover NUMBER, events CLOB, wind_dir_degrees NUMBER, zip_code NUMBER)
CREATE TABLE status (station_id NUMBER, bikes_available NUMBER, docks_available NUMBER, time CLOB)
CREATE TABLE trip (id NUMBER, duration NUMBER, start_date CLOB, start_station_name CLOB, start_station_id NUMBER, end_date CLOB, end_station_name CLOB, end_station_id NUMBER, bike_id NUMBER, subscription_type CLOB, zip_code NUMBER)
CREATE TABLE station (id NUMBER, name CLOB, lat NUMBER, long NUMBER, dock_count NUMBER, city CLOB, installation_date CLOB)
| What is the total cloud cover rates of the dates (bin into year interval) that had the top 5 cloud cover rates? You can draw me a bar chart for this purpose. | SELECT date, SUM(cloud_cover) FROM weather | SELECT "date", SUM("cloud_cover") FROM "weather" | 0.046875 |
CREATE TABLE table_20626467_1 (class VARCHAR2, winner_2nd VARCHAR2)
| What class was the 2nd - portillo? | SELECT class FROM table_20626467_1 WHERE winner_2nd = "2nd - Portillo" | SELECT "class" FROM "table_20626467_1" WHERE "2nd - Portillo" = "winner_2nd" | 0.074219 |
CREATE TABLE table_name_1 (area__km_2__ VARCHAR2, telephone__052_ VARCHAR2)
| Which area has a telephone of (052) of 3862279? | SELECT area__km_2__ FROM table_name_1 WHERE telephone__052_ = "3862279" | SELECT "area__km_2__" FROM "table_name_1" WHERE "3862279" = "telephone__052_" | 0.075195 |
CREATE TABLE player (Player_ID NUMBER, Player CLOB, Years_Played CLOB, Total_WL CLOB, Singles_WL CLOB, Doubles_WL CLOB, Team NUMBER)
CREATE TABLE team (Team_id NUMBER, Name CLOB)
CREATE TABLE match_season (Season FLOAT, Player CLOB, Position CLOB, Country NUMBER, Team NUMBER, Draft_Pick_Number NUMBER, Draft_Class CLOB, College CLOB)
CREATE TABLE country (Country_id NUMBER, Country_name CLOB, Capital CLOB, Official_native_language CLOB)
| Show the draft pick numbers and draft classes of players whose positions are defenders Show bar chart, I want to list by the x-axis from low to high. | SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender" ORDER BY Draft_Class | SELECT "Draft_Class", "Draft_Pick_Number" FROM "match_season" WHERE "Defender" = "Position" ORDER BY "Draft_Class" | 0.111328 |
CREATE TABLE table_name_12 (round NUMBER, time VARCHAR2)
| What is the lowest round number for the fight that had a time of 1:09? | SELECT MIN(round) FROM table_name_12 WHERE time = "1:09" | SELECT MIN("round") FROM "table_name_12" WHERE "1:09" = "time" | 0.060547 |
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| what is the date of birth and religion of patient no. 14755? | SELECT demographic.dob, demographic.religion FROM demographic WHERE demographic.subject_id = "14755" | SELECT "demographic"."dob", "demographic"."religion" FROM "demographic" WHERE "14755" = "demographic"."subject_id" | 0.111328 |
CREATE TABLE table_22725 ("Name" CLOB, "Population ( 2011 ) " FLOAT, "Population ( 2006 ) " FLOAT, "Change ( % ) " CLOB, "Land area ( km\\u00b2 ) " CLOB, "Population density ( per km\\u00b2 ) " CLOB)
| When 1233 is the population of 2011 what is the land area in kilometers squared? | SELECT "Land area (km\u00b2)" FROM table_22725 WHERE "Population (2011)" = '1233' | SELECT "Land area (km\u00b2)" FROM "table_22725" WHERE "Population (2011)" = '1233' | 0.081055 |
CREATE TABLE table_name_11 (venue VARCHAR2, result VARCHAR2)
| Where was the game with result 7-2 played? | SELECT venue FROM table_name_11 WHERE result = "7-2" | SELECT "venue" FROM "table_name_11" WHERE "7-2" = "result" | 0.056641 |
CREATE TABLE table_name_57 (score VARCHAR2, home_team VARCHAR2)
| What was the final score for the match where Hereford United was the home team? | SELECT score FROM table_name_57 WHERE home_team = "hereford united" | SELECT "score" FROM "table_name_57" WHERE "hereford united" = "home_team" | 0.071289 |
CREATE TABLE Student (StuID NUMBER, LName VARCHAR2, Fname VARCHAR2, Age NUMBER, Sex VARCHAR2, Major NUMBER, Advisor NUMBER, city_code VARCHAR2)
CREATE TABLE Faculty (FacID NUMBER, Lname VARCHAR2, Fname VARCHAR2, Rank VARCHAR2, Sex VARCHAR2, Phone NUMBER, Room VARCHAR2, Building VARCHAR2)
CREATE TABLE Participates_in (stuid NUMBER, actid NUMBER)
CREATE TABLE Faculty_Participates_in (FacID NUMBER, actid NUMBER)
CREATE TABLE Activity (actid NUMBER, activity_name VARCHAR2)
| Show me a bar chart for how many faculty members does each building have? List the result with the name of the building. | SELECT Building, COUNT(*) FROM Faculty GROUP BY Building | SELECT "Building", COUNT(*) FROM "Faculty" GROUP BY "Building" | 0.060547 |
CREATE TABLE table_name_77 (losses NUMBER, club VARCHAR2, against VARCHAR2)
| Cobden has more than 1487 against and what average of losses? | SELECT AVG(losses) FROM table_name_77 WHERE club = "cobden" AND against > 1487 | SELECT AVG("losses") FROM "table_name_77" WHERE "against" > 1487 AND "club" = "cobden" | 0.083984 |
CREATE TABLE table_39054 ("Pos." FLOAT, "Matches" FLOAT, "Wins" FLOAT, "Loses" FLOAT, "Results" CLOB, "Points" FLOAT, "Diff." CLOB)
| Loses of 2, and a Pos. smaller than 2 had how many highest matches? | SELECT MAX("Matches") FROM table_39054 WHERE "Loses" = '2' AND "Pos." < '2' | SELECT MAX("Matches") FROM "table_39054" WHERE "Loses" = '2' AND "Pos." < '2' | 0.075195 |
CREATE TABLE table_name_86 (position VARCHAR2, team VARCHAR2, college VARCHAR2)
| Name the position that has baltimore bullets and college of texas tech | SELECT position FROM table_name_86 WHERE team = "baltimore bullets" AND college = "texas tech" | SELECT "position" FROM "table_name_86" WHERE "baltimore bullets" = "team" AND "college" = "texas tech" | 0.099609 |
CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR2)
| Show the ids of all employees who have destroyed a document. | SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed | SELECT DISTINCT "Destroyed_by_Employee_ID" FROM "Documents_to_be_destroyed" | 0.073242 |
CREATE TABLE Customers (first_name VARCHAR2, last_name VARCHAR2, amount_outstanding NUMBER)
| List the first name and last name of customers have the amount of outstanding between 1000 and 3000. | SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000 | SELECT "first_name", "last_name" FROM "Customers" WHERE "amount_outstanding" <= 3000 AND "amount_outstanding" >= 1000 | 0.114258 |
CREATE TABLE table_name_65 (constituency_number VARCHAR2, reserved_for___sc___st__none_ VARCHAR2, name VARCHAR2)
| What is the constituency number with a reserved for ( SC / ST /None) of none, for Katol? | SELECT constituency_number FROM table_name_65 WHERE reserved_for___sc___st__none_ = "none" AND name = "katol" | SELECT "constituency_number" FROM "table_name_65" WHERE "katol" = "name" AND "none" = "reserved_for___sc___st__none_" | 0.114258 |
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)
| what is the procedure icd9 code and procedure long title of subject id 31066? | SELECT procedures.icd9_code, procedures.long_title FROM procedures WHERE procedures.subject_id = "31066" | SELECT "procedures"."icd9_code", "procedures"."long_title" FROM "procedures" WHERE "31066" = "procedures"."subject_id" | 0.115234 |
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE 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)
| provide the number of patients whose admission type is emergency and admission location is phys referral/normal deli? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "EMERGENCY" = "demographic"."admission_type" AND "PHYS REFERRAL/NORMAL DELI" = "demographic"."admission_location" | 0.183594 |
CREATE TABLE table_658 ("Department" CLOB, "Acronym" CLOB, "Office" CLOB, "Incumbent" CLOB, "in Office since" CLOB)
| what's the acronym with department being department of finance kagawaran ng pananalapi | SELECT "Acronym" FROM table_658 WHERE "Department" = 'Department of Finance Kagawaran ng Pananalapi' | SELECT "Acronym" FROM "table_658" WHERE "Department" = 'Department of Finance Kagawaran ng Pananalapi' | 0.099609 |
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 procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE d_icd_diagnoses (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 d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE 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 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 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 labevents (row_id NUMBER, subject_id NUMBER, hadm_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 chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
| patient 14054 had undergone a procedure during this year? | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14054) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 14054 GROUP BY "hadm_id") SELECT COUNT(*) > 0 FROM "procedures_icd" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "procedures_icd"."hadm_id" WHERE DATETIME("procedures_icd"."charttime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND NOT "_u_0"."" IS NULL | 0.365234 |
CREATE TABLE table_name_51 (win__percentage VARCHAR2, _number_of_bids VARCHAR2, conference VARCHAR2)
| When the conference is west coast and the number of bids are at 2, what's the percentage of games won? | SELECT win__percentage FROM table_name_51 WHERE _number_of_bids = 2 AND conference = "west coast" | SELECT "win__percentage" FROM "table_name_51" WHERE "_number_of_bids" = 2 AND "conference" = "west coast" | 0.102539 |
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
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)
| how many patients with phys referral/normal delivery as the admission location are aged below 47 years? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.age < "47" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "47" > "demographic"."age" AND "PHYS REFERRAL/NORMAL DELI" = "demographic"."admission_location" | 0.166016 |
CREATE TABLE countries (COUNTRY_ID VARCHAR2, COUNTRY_NAME VARCHAR2, REGION_ID NUMBER)
CREATE TABLE regions (REGION_ID NUMBER, REGION_NAME VARCHAR2)
CREATE TABLE departments (DEPARTMENT_ID NUMBER, DEPARTMENT_NAME VARCHAR2, MANAGER_ID NUMBER, LOCATION_ID NUMBER)
CREATE TABLE locations (LOCATION_ID NUMBER, STREET_ADDRESS VARCHAR2, POSTAL_CODE VARCHAR2, CITY VARCHAR2, STATE_PROVINCE VARCHAR2, COUNTRY_ID VARCHAR2)
CREATE TABLE employees (EMPLOYEE_ID NUMBER, FIRST_NAME VARCHAR2, LAST_NAME VARCHAR2, EMAIL VARCHAR2, PHONE_NUMBER VARCHAR2, HIRE_DATE DATE, JOB_ID VARCHAR2, SALARY NUMBER, COMMISSION_PCT NUMBER, MANAGER_ID NUMBER, DEPARTMENT_ID NUMBER)
CREATE TABLE job_history (EMPLOYEE_ID NUMBER, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR2, DEPARTMENT_ID NUMBER)
CREATE TABLE jobs (JOB_ID VARCHAR2, JOB_TITLE VARCHAR2, MIN_SALARY NUMBER, MAX_SALARY NUMBER)
| For those employees who was hired before 2002-06-21, a bar chart shows the distribution of hire_date and the average of salary bin hire_date by time, order total number from low to high order. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(SALARY) | SELECT "HIRE_DATE", AVG("SALARY") FROM "employees" WHERE "HIRE_DATE" < '2002-06-21' ORDER BY AVG("SALARY") | 0.103516 |
CREATE TABLE table_7507 ("Week" FLOAT, "Date" CLOB, "Opponent" CLOB, "Result" CLOB, "Location" CLOB, "Record" CLOB, "Attendance" CLOB)
| Where was the game played when the Buffalo Bills had a record of 8-8? | SELECT "Location" FROM table_7507 WHERE "Record" = '8-8' | SELECT "Location" FROM "table_7507" WHERE "Record" = '8-8' | 0.056641 |
CREATE TABLE table_59247 ("County" CLOB, "Precincts" CLOB, "E. Greenberg" CLOB, "G. Hager" CLOB, "T. Wyka" CLOB)
| Name the G. Hager of E. Greenberg of 266 (14%)? | SELECT "G. Hager" FROM table_59247 WHERE "E. Greenberg" = '266 (14%)' | SELECT "G. Hager" FROM "table_59247" WHERE "E. Greenberg" = '266 (14%)' | 0.069336 |
CREATE TABLE table_22068 ("Position" FLOAT, "Club" CLOB, "Games played" FLOAT, "Wins" FLOAT, "Draws" FLOAT, "Loses" FLOAT, "Goals scored" FLOAT, "Goals conceded" FLOAT, "Points" FLOAT)
| In the game with 31 points, how many goals were conceded? | SELECT COUNT("Goals conceded") FROM table_22068 WHERE "Points" = '31' | SELECT COUNT("Goals conceded") FROM "table_22068" WHERE "Points" = '31' | 0.069336 |
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 time_interval (period CLOB, begin_time NUMBER, end_time 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 month (month_number NUMBER, month_name CLOB)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name 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 airline (airline_code VARCHAR2, airline_name CLOB, note CLOB)
CREATE TABLE flight_fare (flight_id NUMBER, fare_id 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 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 equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
CREATE TABLE flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight 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 city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE aircraft (aircraft_code VARCHAR2, aircraft_description VARCHAR2, manufacturer VARCHAR2, basic_type VARCHAR2, engines NUMBER, propulsion VARCHAR2, wide_body VARCHAR2, wing_span NUMBER, length NUMBER, weight NUMBER, capacity NUMBER, pay_load NUMBER, cruising_speed NUMBER, range_miles NUMBER, pressurized VARCHAR2)
CREATE TABLE 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 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 time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
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 food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type VARCHAR2)
| flight information from SAN FRANCISCO to PITTSBURGH | 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | 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" = 'SAN FRANCISCO' JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'PITTSBURGH' | 0.491211 |
CREATE TABLE table_203_189 (id NUMBER, "year" NUMBER, "competition" CLOB, "venue" CLOB, "position" CLOB, "notes" CLOB)
| what was the longest distance traveled in the competitions ? | SELECT "notes" FROM table_203_189 ORDER BY "notes" DESC LIMIT 1 | SELECT "notes" FROM "table_203_189" ORDER BY "notes" DESC FETCH FIRST 1 ROWS ONLY | 0.079102 |
CREATE TABLE Products (Code NUMBER, Name VARCHAR2, Price NUMBER, Manufacturer NUMBER)
CREATE TABLE Manufacturers (Code NUMBER, Name VARCHAR2, Headquarter VARCHAR2, Founder VARCHAR2, Revenue FLOAT)
| For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of code , and group by attribute name, and display from high to low by the y-axis please. | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC | SELECT "T2"."Name", "T1"."Code" FROM "Products" "T1" JOIN "Manufacturers" "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "T2"."Name" ORDER BY "T1"."Code" DESC | 0.158203 |
CREATE TABLE faculty (lname VARCHAR2, rank VARCHAR2)
CREATE TABLE Faculty (lname VARCHAR2, facID VARCHAR2)
CREATE TABLE activity (activity_name VARCHAR2)
CREATE TABLE Faculty_participates_in (facID VARCHAR2, actid VARCHAR2)
| Find the first names of professors who are not playing Canoeing or Kayaking. | SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | SELECT "lname" FROM "faculty" WHERE "rank" = 'Professor' EXCEPT SELECT DISTINCT "T1"."lname" FROM "faculty" "T1" JOIN "Faculty_participates_in" "T2" ON "T1"."facID" = "T2"."facID" JOIN "activity" "T3" ON "T2"."actid" = "T2"."actid" AND ("T3"."activity_name" = 'Canoeing' OR "T3"."activity_name" = 'Kayaking') | 0.300781 |
CREATE TABLE Employees (Employee_ID NUMBER, Role_Code CHAR, Employee_Name VARCHAR2, Gender_MFU CHAR, Date_of_Birth DATETIME, Other_Details VARCHAR2)
CREATE TABLE Document_Locations (Document_ID NUMBER, Location_Code CHAR, Date_in_Location_From DATETIME, Date_in_Locaton_To DATETIME)
CREATE TABLE Documents_to_be_Destroyed (Document_ID NUMBER, Destruction_Authorised_by_Employee_ID NUMBER, Destroyed_by_Employee_ID NUMBER, Planned_Destruction_Date DATETIME, Actual_Destruction_Date DATETIME, Other_Details VARCHAR2)
CREATE TABLE Ref_Calendar (Calendar_Date DATETIME, Day_Number NUMBER)
CREATE TABLE Ref_Locations (Location_Code CHAR, Location_Name VARCHAR2, Location_Description VARCHAR2)
CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR, Document_Type_Name VARCHAR2, Document_Type_Description VARCHAR2)
CREATE TABLE All_Documents (Document_ID NUMBER, Date_Stored DATETIME, Document_Type_Code CHAR, Document_Name CHAR, Document_Description CHAR, Other_Details VARCHAR2)
CREATE TABLE Roles (Role_Code CHAR, Role_Name VARCHAR2, Role_Description VARCHAR2)
| Create a bar chart showing the total number across location code, and order by the Location_Code in asc. | SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code ORDER BY Location_Code | SELECT "Location_Code", COUNT(*) FROM "Document_Locations" GROUP BY "Location_Code" ORDER BY "Location_Code" | 0.105469 |
CREATE TABLE table_63328 ("Restaurant Name" CLOB, "Original Name" CLOB, "Location" CLOB, "Chef" CLOB, "Designer" CLOB, "Still Open?" CLOB)
| What designer has a restaurant named The Citizen? | SELECT "Designer" FROM table_63328 WHERE "Restaurant Name" = 'the citizen' | SELECT "Designer" FROM "table_63328" WHERE "Restaurant Name" = 'the citizen' | 0.074219 |
CREATE TABLE table_name_40 (away_team VARCHAR2, home_team VARCHAR2)
| What was home team North Melbourne's opponents score? | SELECT away_team AS score FROM table_name_40 WHERE home_team = "north melbourne" | SELECT "away_team" AS "score" FROM "table_name_40" WHERE "home_team" = "north melbourne" | 0.085938 |
CREATE TABLE table_203_671 (id NUMBER, "name" CLOB, "rank" CLOB, "age" NUMBER, "years until mandatory retirement" CLOB, "appointed by" CLOB, "year appointed" NUMBER)
| who was the only associate justice appointed in 2010 ? | SELECT "name" FROM table_203_671 WHERE "rank" = 'associate justice' AND "year appointed" = 2010 | SELECT "name" FROM "table_203_671" WHERE "rank" = 'associate justice' AND "year appointed" = 2010 | 0.094727 |
CREATE TABLE Plays_Games (StuID NUMBER, GameID NUMBER, Hours_Played NUMBER)
CREATE TABLE SportsInfo (StuID NUMBER, SportName VARCHAR2, HoursPerWeek NUMBER, GamesPlayed NUMBER, OnScholarship VARCHAR2)
CREATE TABLE Video_Games (GameID NUMBER, GName VARCHAR2, GType VARCHAR2)
CREATE TABLE Student (StuID NUMBER, LName VARCHAR2, Fname VARCHAR2, Age NUMBER, Sex VARCHAR2, Major NUMBER, Advisor NUMBER, city_code VARCHAR2)
| Return a scatter chart showing the relationship between major id and average age. | SELECT Major, AVG(Age) FROM Student GROUP BY Major | SELECT "Major", AVG("Age") FROM "Student" GROUP BY "Major" | 0.056641 |
CREATE TABLE Student_Course_Enrolment (registration_id NUMBER, student_id NUMBER, course_id NUMBER, date_of_enrolment DATETIME, date_of_completion DATETIME)
CREATE TABLE Course_Authors_and_Tutors (author_id NUMBER, author_tutor_ATB VARCHAR2, login_name VARCHAR2, password VARCHAR2, personal_name VARCHAR2, middle_name VARCHAR2, family_name VARCHAR2, gender_mf VARCHAR2, address_line_1 VARCHAR2)
CREATE TABLE Student_Tests_Taken (registration_id NUMBER, date_test_taken DATETIME, test_result VARCHAR2)
CREATE TABLE Courses (course_id NUMBER, author_id NUMBER, subject_id NUMBER, course_name VARCHAR2, course_description VARCHAR2)
CREATE TABLE Subjects (subject_id NUMBER, subject_name VARCHAR2)
CREATE TABLE Students (student_id NUMBER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR2, password VARCHAR2, personal_name VARCHAR2, middle_name VARCHAR2, family_name VARCHAR2)
| A line chart for what are the number of the enrollment dates of all the tests that have result 'Pass'?, could you order x axis from high to low order please? | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment ORDER BY date_of_enrolment DESC | SELECT "date_of_enrolment", COUNT("date_of_enrolment") FROM "Student_Course_Enrolment" "T1" JOIN "Student_Tests_Taken" "T2" ON "Pass" = "T2"."test_result" AND "T1"."registration_id" = "T2"."registration_id" GROUP BY "date_of_enrolment" ORDER BY "date_of_enrolment" DESC | 0.262695 |
CREATE TABLE table_24257833_4 (major_version VARCHAR2, release_date VARCHAR2, minor_version VARCHAR2)
| List major versions released on May 12, 2009, that had a minor version of 3.2.3. | SELECT major_version FROM table_24257833_4 WHERE release_date = "May 12, 2009" AND minor_version = "3.2.3" | SELECT "major_version" FROM "table_24257833_4" WHERE "3.2.3" = "minor_version" AND "May 12, 2009" = "release_date" | 0.111328 |
CREATE TABLE table_1341586_39 (district VARCHAR2, candidates VARCHAR2)
| what's district with candidates being curt weldon (r) 61.3% bill spingler (d) 38.7% | SELECT district FROM table_1341586_39 WHERE candidates = "Curt Weldon (R) 61.3% Bill Spingler (D) 38.7%" | SELECT "district" FROM "table_1341586_39" WHERE "Curt Weldon (R) 61.3% Bill Spingler (D) 38.7%" = "candidates" | 0.107422 |
CREATE TABLE table_name_53 (week NUMBER, result VARCHAR2)
| What was the highest week with a result of l 16 12? | SELECT MAX(week) FROM table_name_53 WHERE result = "l 16–12" | SELECT MAX("week") FROM "table_name_53" WHERE "l 16–12" = "result" | 0.064453 |
CREATE TABLE table_name_18 (gold VARCHAR2, year VARCHAR2)
| Who won the gold in 1958? | SELECT gold FROM table_name_18 WHERE year = "1958" | SELECT "gold" FROM "table_name_18" WHERE "1958" = "year" | 0.054688 |
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 (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 team_franchise (franchise_id CLOB, franchise_name CLOB, active CLOB, na_assoc CLOB)
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 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 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 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 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 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 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 park (park_id CLOB, park_name CLOB, park_alias CLOB, city CLOB, state CLOB, country 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 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 (player_id CLOB, award_id CLOB, year NUMBER, league_id CLOB, tie CLOB, notes CLOB)
CREATE TABLE fielding_outfield (player_id CLOB, year NUMBER, stint NUMBER, glf NUMBER, gcf NUMBER, grf NUMBER)
CREATE TABLE player_college (player_id CLOB, college_id CLOB, year NUMBER)
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 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)
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 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 college (college_id CLOB, name_full CLOB, city CLOB, state CLOB, country CLOB)
CREATE TABLE salary (year NUMBER, team_id CLOB, league_id CLOB, player_id CLOB, salary 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 manager_award (player_id CLOB, award_id CLOB, year NUMBER, league_id CLOB, tie CLOB, notes NUMBER)
| I want to see trend of the total number by yearid | SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid | SELECT "yearid", COUNT(*) FROM "hall_of_fame" GROUP BY "yearid" | 0.061523 |
CREATE TABLE table_name_8 (tournament VARCHAR2, date VARCHAR2)
| What tournament was on Jan 29, 2012? | SELECT tournament FROM table_name_8 WHERE date = "jan 29, 2012" | SELECT "tournament" FROM "table_name_8" WHERE "date" = "jan 29, 2012" | 0.067383 |
CREATE TABLE table_name_81 (owner VARCHAR2, format VARCHAR2)
| Tell me the owner for classical | SELECT owner FROM table_name_81 WHERE format = "classical" | SELECT "owner" FROM "table_name_81" WHERE "classical" = "format" | 0.0625 |
CREATE TABLE event (Event_ID NUMBER, Date CLOB, Venue CLOB, Name CLOB, Event_Attendance NUMBER)
CREATE TABLE journalist (journalist_ID NUMBER, Name CLOB, Nationality CLOB, Age CLOB, Years_working NUMBER)
CREATE TABLE news_report (journalist_ID NUMBER, Event_ID NUMBER, Work_Type CLOB)
| Compare the total number of journalist with different nationality using a bar chart, and rank by the Y from high to low. | SELECT Nationality, COUNT(Nationality) FROM journalist GROUP BY Nationality ORDER BY COUNT(Nationality) DESC | SELECT "Nationality", COUNT("Nationality") FROM "journalist" GROUP BY "Nationality" ORDER BY COUNT("Nationality") DESC | 0.115234 |
CREATE TABLE table_204_587 (id NUMBER, "drop ( s ) " CLOB, "multiplayer map ( s ) " CLOB, "spec ops mission ( s ) " CLOB, "face off map ( s ) " CLOB, "xbox 360 release date" CLOB, "playstation 3 release date" CLOB)
| were drops 4-6 released on xbox 360 after they were released on playstation 3 ? | SELECT (SELECT "xbox 360 release date" FROM table_204_587 WHERE "drop(s)" = '4-6') > (SELECT "playstation 3 release date" FROM table_204_587 WHERE "drop(s)" = '4-6') | SELECT (SELECT "playstation 3 release date" FROM "table_204_587" WHERE "drop(s)" = '4-6') < (SELECT "xbox 360 release date" FROM "table_204_587" WHERE "drop(s)" = '4-6') | 0.165039 |
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
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 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)
| get the number of elective hospital admission patients who have lumbago diagnoses. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.short_title = "Lumbago" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "Lumbago" = "diagnoses"."short_title" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "ELECTIVE" = "demographic"."admission_type" | 0.222656 |
CREATE TABLE table_61377 ("Round" CLOB, "Opponents" CLOB, "Home" CLOB, "Away" CLOB, "Aggregate" CLOB)
| What is the Aggregate of Bayer Leverkusen opponents? | SELECT "Aggregate" FROM table_61377 WHERE "Opponents" = 'bayer leverkusen' | SELECT "Aggregate" FROM "table_61377" WHERE "Opponents" = 'bayer leverkusen' | 0.074219 |
CREATE TABLE table_63347 ("House" CLOB, "Abbr." CLOB, "Type" CLOB, "Colour" CLOB, "Boarding/Day" CLOB)
| Which house has a Boarding/Day value of Day? | SELECT "House" FROM table_63347 WHERE "Boarding/Day" = 'day' | SELECT "House" FROM "table_63347" WHERE "Boarding/Day" = 'day' | 0.060547 |
CREATE TABLE table_36523 ("Date" CLOB, "Opponent" CLOB, "Score" CLOB, "Loss" CLOB, "Attendance" FLOAT, "Record" CLOB)
| Score of 3 4, and a Attendance larger than 34,609 happened on what date? | SELECT "Date" FROM table_36523 WHERE "Score" = '3–4' AND "Attendance" > '34,609' | SELECT "Date" FROM "table_36523" WHERE "Attendance" > '34,609' AND "Score" = '3–4' | 0.080078 |
CREATE TABLE table_name_87 (home_team VARCHAR2, away_team VARCHAR2)
| What is the home teams score when north melbourne is the away team? | SELECT home_team AS score FROM table_name_87 WHERE away_team = "north melbourne" | SELECT "home_team" AS "score" FROM "table_name_87" WHERE "away_team" = "north melbourne" | 0.085938 |
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category 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 requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
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 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 program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE area (course_id NUMBER, area 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 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 ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname 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)
| What are the upper-level MUSTHTRE classes being offered this Summer ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MUSTHTRE' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | SELECT DISTINCT "course"."department", "course"."name", "course"."number" FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" JOIN "program_course" ON "course"."course_id" = "program_course"."course_id" AND "program_course"."category" LIKE '%ULCS%' JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" = 'Summer' AND "semester"."year" = 2016 WHERE "course"."department" = 'MUSTHTRE' | 0.459961 |
CREATE TABLE table_63105 ("Rank" FLOAT, "Lane" FLOAT, "Name" CLOB, "Nationality" CLOB, "Time" FLOAT)
| Which Time has a Lane smaller than 4, and a Rank larger than 6? | SELECT AVG("Time") FROM table_63105 WHERE "Lane" < '4' AND "Rank" > '6' | SELECT AVG("Time") FROM "table_63105" WHERE "Lane" < '4' AND "Rank" > '6' | 0.071289 |
CREATE TABLE table_64127 ("Rank" FLOAT, "Gold" FLOAT, "Silver" FLOAT, "Bronze" FLOAT, "Total" FLOAT)
| What is the number of silver when bronze is 0, and rank is less than 2? | SELECT SUM("Silver") FROM table_64127 WHERE "Bronze" = '0' AND "Rank" < '2' | SELECT SUM("Silver") FROM "table_64127" WHERE "Bronze" = '0' AND "Rank" < '2' | 0.075195 |
Subsets and Splits