schema
stringlengths 28
5.65k
| question
stringlengths 0
990
| rejected
stringlengths 2
4.44k
| chosen
stringlengths 4
9.17k
| weight
float64 0
8.95
|
---|---|---|---|---|
CREATE TABLE table_40374 ("Tie no" TEXT, "Home team" TEXT, "Score" TEXT, "Away team" TEXT, "Attendance" TEXT)
| Tell me the score when there was a Tie number of 6? | SELECT "Score" FROM table_40374 WHERE "Tie no" = '6' | SELECT "Score" FROM "table_40374" WHERE "Tie no" = '6' | 0.052734 |
CREATE TABLE table_name_42 (streak VARCHAR, record VARCHAR)
| What is the Streak in the game with a Record of 20 16? | SELECT streak FROM table_name_42 WHERE record = "20β16" | SELECT "streak" FROM "table_name_42" WHERE "20β16" = "record" | 0.05957 |
CREATE TABLE table_1341663_33 (first_elected INT, incumbent VARCHAR)
| When was Stephen J. Solarz first elected? | SELECT MIN(first_elected) FROM table_1341663_33 WHERE incumbent = "Stephen J. Solarz" | SELECT MIN("first_elected") FROM "table_1341663_33" WHERE "Stephen J. Solarz" = "incumbent" | 0.088867 |
CREATE TABLE table_25390694_2 (production_code VARCHAR, writer VARCHAR)
| What was the production code of the episode written by Brendan Cowell? | SELECT production_code FROM table_25390694_2 WHERE writer = "Brendan Cowell" | SELECT "production_code" FROM "table_25390694_2" WHERE "Brendan Cowell" = "writer" | 0.080078 |
CREATE TABLE table_51442 ("Date" TEXT, "Visitor" TEXT, "Score" TEXT, "Home" TEXT, "Decision" TEXT, "Attendance" FLOAT, "Record" TEXT)
| What was the decision of the game when Montreal was the home team? | SELECT "Decision" FROM table_51442 WHERE "Home" = 'montreal' | SELECT "Decision" FROM "table_51442" WHERE "Home" = 'montreal' | 0.060547 |
CREATE TABLE table_name_69 (date VARCHAR, edition VARCHAR, result VARCHAR)
| What date was the 1988 world group i edition with a result of 7 6 (7 5) , 6 3? | SELECT date FROM table_name_69 WHERE edition = "1988 world group i" AND result = "7β6 (7β5) , 6β3" | SELECT "date" FROM "table_name_69" WHERE "1988 world group i" = "edition" AND "7β6 (7β5) , 6β3" = "result" | 0.103516 |
CREATE TABLE table_name_69 (chassis VARCHAR, year VARCHAR, engine VARCHAR)
| What company built the chassis for a year later than 1959 and a climax l4 engine? | SELECT chassis FROM table_name_69 WHERE year > 1959 AND engine = "climax l4" | SELECT "chassis" FROM "table_name_69" WHERE "climax l4" = "engine" AND "year" > 1959 | 0.082031 |
CREATE TABLE table_name_85 (charter_range VARCHAR, school VARCHAR)
| What are the active dates for the Montana State University chapter? | SELECT charter_range FROM table_name_85 WHERE school = "montana state university" | SELECT "charter_range" FROM "table_name_85" WHERE "montana state university" = "school" | 0.084961 |
CREATE TABLE drivers (driverId INT, driverRef TEXT, number TEXT, code TEXT, forename TEXT, surname TEXT, dob TEXT, nationality TEXT, url TEXT)
CREATE TABLE driverStandings (driverStandingsId INT, raceId INT, driverId INT, points FLOAT, position INT, positionText TEXT, wins INT)
CREATE TABLE status (statusId INT, status TEXT)
CREATE TABLE seasons (year INT, url TEXT)
CREATE TABLE pitStops (raceId INT, driverId INT, stop INT, lap INT, time TEXT, duration TEXT, milliseconds INT)
CREATE TABLE constructors (constructorId INT, constructorRef TEXT, name TEXT, nationality TEXT, url TEXT)
CREATE TABLE lapTimes (raceId INT, driverId INT, lap INT, position INT, time TEXT, milliseconds INT)
CREATE TABLE results (resultId INT, raceId INT, driverId INT, constructorId INT, number INT, grid INT, position TEXT, positionText TEXT, positionOrder INT, points FLOAT, laps TEXT, time TEXT, milliseconds TEXT, fastestLap TEXT, rank TEXT, fastestLapTime TEXT, fastestLapSpeed TEXT, statusId INT)
CREATE TABLE races (raceId INT, year INT, round INT, circuitId INT, name TEXT, date TEXT, time TEXT, url TEXT)
CREATE TABLE qualifying (qualifyId INT, raceId INT, driverId INT, constructorId INT, number INT, position INT, q1 TEXT, q2 TEXT, q3 TEXT)
CREATE TABLE constructorResults (constructorResultsId INT, raceId INT, constructorId INT, points FLOAT, status TEXT)
CREATE TABLE constructorStandings (constructorStandingsId INT, raceId INT, constructorId INT, points FLOAT, position INT, positionText TEXT, wins INT)
CREATE TABLE circuits (circuitId INT, circuitRef TEXT, name TEXT, location TEXT, country TEXT, lat FLOAT, lng FLOAT, alt TEXT, url TEXT)
| A pie chart for finding the number of the names of Japanese constructors that have once earned more than 5 points? | SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name | SELECT "name", COUNT("name") FROM "constructors" AS "T1" JOIN "constructorStandings" AS "T2" ON "T1"."constructorId" = "T2"."constructorId" AND "T2"."points" > 5 WHERE "Japanese" = "T1"."nationality" GROUP BY "name" | 0.209961 |
CREATE TABLE table_203_815 (id DECIMAL, "pick #" DECIMAL, "nfl team" TEXT, "player" TEXT, "position" TEXT, "college" TEXT)
| what was the number of guards picked in the ninth round of the 1937 nfl draft ? | SELECT COUNT(*) FROM table_203_815 WHERE "position" = 'guard' | SELECT COUNT(*) FROM "table_203_815" WHERE "position" = 'guard' | 0.061523 |
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
| when patient 73595 first received exc/dest intvrt disc nos until 2104? | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'exc/dest intvrt disc nos') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73595) AND STRFTIME('%y', procedures_icd.charttime) <= '2104' ORDER BY procedures_icd.charttime LIMIT 1 | WITH "_u_1" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 73595 GROUP BY "hadm_id") SELECT "procedures_icd"."charttime" FROM "procedures_icd" JOIN "d_icd_procedures" ON "d_icd_procedures"."icd9_code" = "procedures_icd"."icd9_code" AND "d_icd_procedures"."short_title" = 'exc/dest intvrt disc nos' LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "procedures_icd"."hadm_id" WHERE NOT "_u_1"."" IS NULL AND STRFTIME('%y', "procedures_icd"."charttime") <= '2104' ORDER BY "procedures_icd"."charttime" NULLS FIRST LIMIT 1 | 0.537109 |
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
| when did patient 009-12985 receive his or her prescription for the first time since 144 months ago? | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-12985')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-144 month') ORDER BY medication.drugstarttime LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '009-12985' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "medication"."drugstarttime" FROM "medication" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "medication"."patientunitstayid" WHERE DATETIME("medication"."drugstarttime") >= DATETIME(CURRENT_TIME(), '-144 month') AND NOT "_u_1"."" IS NULL ORDER BY "medication"."drugstarttime" NULLS FIRST LIMIT 1 | 0.641602 |
CREATE TABLE Plays_Games (StuID INT, GameID INT, Hours_Played INT)
CREATE TABLE Video_Games (GameID INT, GName VARCHAR, GType VARCHAR)
CREATE TABLE Student (StuID INT, LName VARCHAR, Fname VARCHAR, Age INT, Sex VARCHAR, Major INT, Advisor INT, city_code VARCHAR)
CREATE TABLE SportsInfo (StuID INT, SportName VARCHAR, HoursPerWeek INT, GamesPlayed INT, OnScholarship VARCHAR)
| Bar chart x axis sportname y axis the total number, order by the y axis in ascending. | SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY COUNT(*) | SELECT "SportName", COUNT(*) FROM "SportsInfo" GROUP BY "SportName" ORDER BY COUNT(*) NULLS FIRST | 0.094727 |
CREATE TABLE table_204_91 (id DECIMAL, "year" DECIMAL, "original title" TEXT, "english title" TEXT, "role" TEXT, "notes" TEXT)
| the most films henrick malberg appeared in in one year . | SELECT COUNT("original title") FROM table_204_91 GROUP BY "year" ORDER BY COUNT("original title") DESC LIMIT 1 | SELECT COUNT("original title") FROM "table_204_91" GROUP BY "year" ORDER BY COUNT("original title") DESC NULLS LAST LIMIT 1 | 0.120117 |
CREATE TABLE table_14603057_2 (class_aA VARCHAR, class_a VARCHAR, class_aAAAA VARCHAR, Lubbock VARCHAR)
| Who was the Class AA winner when Plains was Class A winner and Lubbock was Class AAAAA winner? | SELECT class_aA FROM table_14603057_2 WHERE class_a = "Plains" AND class_aAAAA = Lubbock | SELECT "class_aA" FROM "table_14603057_2" WHERE "Lubbock" = "class_aAAAA" AND "Plains" = "class_a" | 0.095703 |
CREATE TABLE table_42669 ("Benchmark" TEXT, "Crown height" TEXT, "Pavilion depth" TEXT, "Table diameter" TEXT, "Girdle thickness" TEXT, "Crown angle" TEXT, "Pavilion angle" TEXT, "Brilliance Grade" TEXT)
| Which Pavilion depth has a Crown angle of 34.0 34.7 ? | SELECT "Pavilion depth" FROM table_42669 WHERE "Crown angle" = '34.0β34.7Β°' | SELECT "Pavilion depth" FROM "table_42669" WHERE "Crown angle" = '34.0β34.7Β°' | 0.075195 |
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| How many of the patients diagnosed with other emphysema have an unspecified death status? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Other emphysema" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "Other emphysema" = "diagnoses"."long_title" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "0" = "demographic"."expire_flag" | 0.219727 |
CREATE TABLE Apartment_Facilities (apt_id INT, facility_code CHAR)
CREATE TABLE Apartments (apt_id INT, building_id INT, apt_type_code CHAR, apt_number CHAR, bathroom_count INT, bedroom_count INT, room_count CHAR)
CREATE TABLE Apartment_Bookings (apt_booking_id INT, apt_id INT, guest_id INT, booking_status_code CHAR, booking_start_date DATETIME, booking_end_date DATETIME)
CREATE TABLE Apartment_Buildings (building_id INT, building_short_name CHAR, building_full_name VARCHAR, building_description VARCHAR, building_address VARCHAR, building_manager VARCHAR, building_phone VARCHAR)
CREATE TABLE Guests (guest_id INT, gender_code CHAR, guest_first_name VARCHAR, guest_last_name VARCHAR, date_of_birth DATETIME)
CREATE TABLE View_Unit_Status (apt_id INT, apt_booking_id INT, status_date DATETIME, available_yn BIT)
| Return the date of birth for all the guests with gender code 'Male', and count them by a bar chart, I want to order the number of date of birth from high to low order. | SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male" ORDER BY COUNT(date_of_birth) DESC | SELECT "date_of_birth", COUNT("date_of_birth") FROM "Guests" WHERE "Male" = "gender_code" ORDER BY COUNT("date_of_birth") DESC NULLS LAST | 0.133789 |
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
| How many patients are born before 2197 and with procedure icd9 code 309? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2197" AND procedures.icd9_code = "309" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "309" = "procedures"."icd9_code" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "2197" > "demographic"."dob_year" | 0.209961 |
CREATE TABLE table_21181 ("Show" TEXT, "Last Aired" FLOAT, "Previous Network" TEXT, "Retitled as/Same" TEXT, "New/Returning/Same Network" TEXT, "Returning" TEXT)
| Which show was sent to syndication for its new/returning/same network. | SELECT "Show" FROM table_21181 WHERE "New/Returning/Same Network" = 'Syndication' | SELECT "Show" FROM "table_21181" WHERE "New/Returning/Same Network" = 'Syndication' | 0.081055 |
CREATE TABLE table_174151_5 (power_provided VARCHAR, transfer_speed__mb_s_ VARCHAR, max_cable_length__m_ VARCHAR)
| Name the power provided where transfer speed mb/s is 300 and max cable length of 10 | SELECT power_provided FROM table_174151_5 WHERE transfer_speed__mb_s_ = "300" AND max_cable_length__m_ = "10" | SELECT "power_provided" FROM "table_174151_5" WHERE "10" = "max_cable_length__m_" AND "300" = "transfer_speed__mb_s_" | 0.114258 |
CREATE TABLE table_25017 ("State ( class ) " TEXT, "Vacator" TEXT, "Reason for change" TEXT, "Successor" TEXT, "Date of successors formal installation" TEXT)
| in which state where John Laurance (f) as a vacator? | SELECT "State (class)" FROM table_25017 WHERE "Vacator" = 'John Laurance (F)' | SELECT "State (class)" FROM "table_25017" WHERE "Vacator" = 'John Laurance (F)' | 0.077148 |
CREATE TABLE table_name_23 (class VARCHAR, type VARCHAR)
| What is the class of the locomotive with a 0-4-0st type? | SELECT class FROM table_name_23 WHERE type = "0-4-0st" | SELECT "class" FROM "table_name_23" WHERE "0-4-0st" = "type" | 0.058594 |
CREATE TABLE table_11948857_1 (county_s__represented VARCHAR, member_senator VARCHAR)
| What is the county for senator C. Anthony Muse? | SELECT county_s__represented FROM table_11948857_1 WHERE member_senator = "C. Anthony Muse" | SELECT "county_s__represented" FROM "table_11948857_1" WHERE "C. Anthony Muse" = "member_senator" | 0.094727 |
CREATE TABLE table_203_298 (id DECIMAL, "rank" DECIMAL, "name" TEXT, "nation ( s ) " TEXT, "born" TEXT, "ascended" TEXT, "years reigned" TEXT)
| how many reigned more than 50 years ? | SELECT COUNT(*) FROM table_203_298 WHERE "years reigned" >= 50 | SELECT COUNT(*) FROM "table_203_298" WHERE "years reigned" >= 50 | 0.0625 |
CREATE TABLE wrestler (Wrestler_ID INT, Name TEXT, Reign TEXT, Days_held TEXT, Location TEXT, Event TEXT)
CREATE TABLE Elimination (Elimination_ID TEXT, Wrestler_ID TEXT, Team TEXT, Eliminated_By TEXT, Elimination_Move TEXT, Time TEXT)
| Return a bar chart on how many eliminations did each team have? | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team | SELECT "Team", COUNT(*) FROM "Elimination" GROUP BY "Team" | 0.056641 |
CREATE TABLE departments (DEPARTMENT_ID DECIMAL, DEPARTMENT_NAME VARCHAR, MANAGER_ID DECIMAL, LOCATION_ID DECIMAL)
CREATE TABLE jobs (JOB_ID VARCHAR, JOB_TITLE VARCHAR, MIN_SALARY DECIMAL, MAX_SALARY DECIMAL)
CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DECIMAL)
CREATE TABLE regions (REGION_ID DECIMAL, REGION_NAME VARCHAR)
CREATE TABLE employees (EMPLOYEE_ID DECIMAL, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR, SALARY DECIMAL, COMMISSION_PCT DECIMAL, MANAGER_ID DECIMAL, DEPARTMENT_ID DECIMAL)
CREATE TABLE locations (LOCATION_ID DECIMAL, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR, COUNTRY_ID VARCHAR)
CREATE TABLE job_history (EMPLOYEE_ID DECIMAL, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR, DEPARTMENT_ID DECIMAL)
| For all employees who have the letters D or S in their first name, a line chart shows the change of manager_id over hire_date | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | SELECT "HIRE_DATE", "MANAGER_ID" FROM "employees" WHERE "FIRST_NAME" LIKE '%D%' OR "FIRST_NAME" LIKE '%S%' | 0.103516 |
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
| tell me the sex of patient 006-40255. | SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '006-40255' | SELECT DISTINCT "patient"."gender" FROM "patient" WHERE "patient"."uniquepid" = '006-40255' | 0.088867 |
CREATE TABLE table_name_35 (date VARCHAR, home_team VARCHAR)
| What day is south melbourne at home? | SELECT date FROM table_name_35 WHERE home_team = "south melbourne" | SELECT "date" FROM "table_name_35" WHERE "home_team" = "south melbourne" | 0.070313 |
CREATE TABLE table_name_2 (played INT, club VARCHAR, wins VARCHAR)
| What is the number played for the Barcelona B club, with wins under 11? | SELECT SUM(played) FROM table_name_2 WHERE club = "barcelona b" AND wins < 11 | SELECT SUM("played") FROM "table_name_2" WHERE "barcelona b" = "club" AND "wins" < 11 | 0.083008 |
CREATE TABLE table_32730 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| What is the venue for the Footscray home team? | SELECT "Venue" FROM table_32730 WHERE "Home team" = 'footscray' | SELECT "Venue" FROM "table_32730" WHERE "Home team" = 'footscray' | 0.063477 |
CREATE TABLE table_78250 ("Year" FLOAT, "Manufacturer" TEXT, "Model" TEXT, "Length ( ft. ) " TEXT, "Fuel or Propulsion" TEXT, "Fleet series" TEXT, "Quantity" FLOAT)
| Name the sum of quantity for before 2011 model slf-230 | SELECT SUM("Quantity") FROM table_78250 WHERE "Year" < '2011' AND "Model" = 'slf-230' | SELECT SUM("Quantity") FROM "table_78250" WHERE "Model" = 'slf-230' AND "Year" < '2011' | 0.084961 |
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
| what is the name of the drug that patient 030-77189 had been prescribed two or more times in 12/2102? | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-77189')) AND STRFTIME('%y-%m', medication.drugstarttime) = '2102-12' GROUP BY medication.drugname) AS t1 WHERE t1.c1 >= 2 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '030-77189' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid"), "t1" AS (SELECT "medication"."drugname", COUNT("medication"."drugstarttime") AS "c1" FROM "medication" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "medication"."patientunitstayid" WHERE NOT "_u_1"."" IS NULL AND STRFTIME('%y-%m', "medication"."drugstarttime") = '2102-12' GROUP BY "medication"."drugname") SELECT "t1"."drugname" FROM "t1" AS "t1" WHERE "t1"."c1" >= 2 | 0.707031 |
CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR, Document_Type_Name VARCHAR, Document_Type_Description VARCHAR)
CREATE TABLE Documents_with_Expenses (Document_ID INT, Budget_Type_Code CHAR, Document_Details VARCHAR)
CREATE TABLE Projects (Project_ID INT, Project_Details VARCHAR)
CREATE TABLE Statements (Statement_ID INT, Statement_Details VARCHAR)
CREATE TABLE Accounts (Account_ID INT, Statement_ID INT, Account_Details VARCHAR)
CREATE TABLE Ref_Budget_Codes (Budget_Type_Code CHAR, Budget_Type_Description VARCHAR)
CREATE TABLE Documents (Document_ID INT, Document_Type_Code CHAR, Project_ID INT, Document_Date DATETIME, Document_Name VARCHAR, Document_Description VARCHAR, Other_Details VARCHAR)
| Return the ids and details corresponding to projects for which there are more than two documents in a bar chart. | SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID | SELECT "T1"."Project_Details", "T1"."Project_ID" FROM "Projects" AS "T1" JOIN "Documents" AS "T2" ON "T1"."Project_ID" = "T2"."Project_ID" | 0.134766 |
CREATE TABLE table_name_98 (high_assists VARCHAR, high_points VARCHAR)
| What was the high assists from a high points of dorell wright (20)? | SELECT high_assists FROM table_name_98 WHERE high_points = "dorell wright (20)" | SELECT "high_assists" FROM "table_name_98" WHERE "dorell wright (20)" = "high_points" | 0.083008 |
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
| how many patients were diagnosed with intracranial injury - with concussion and they didn't come back to the hospital during the same month until 2104? | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'intracranial injury - with concussion' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1) - (SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'intracranial injury - with concussion' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t2 JOIN patient ON t2.uniquepid = patient.uniquepid WHERE t2.diagnosistime < patient.hospitaladmittime AND STRFTIME('%y', patient.hospitaladmittime) <= '2104' AND DATETIME(t2.diagnosistime, 'start of month') = DATETIME(patient.hospitaladmittime, 'start of month')) | SELECT (SELECT COUNT(DISTINCT "patient"."uniquepid") FROM "diagnosis" JOIN "patient" ON "diagnosis"."patientunitstayid" = "patient"."patientunitstayid" WHERE "diagnosis"."diagnosisname" = 'intracranial injury - with concussion' AND STRFTIME('%y', "diagnosis"."diagnosistime") <= '2104') - (SELECT COUNT(DISTINCT "patient_2"."uniquepid") FROM "diagnosis" JOIN "patient" AS "patient_2" ON "diagnosis"."patientunitstayid" = "patient_2"."patientunitstayid" JOIN "patient" ON "diagnosis"."diagnosistime" < "patient"."hospitaladmittime" AND "patient"."uniquepid" = "patient_2"."uniquepid" AND DATETIME("diagnosis"."diagnosistime", 'start of month') = DATETIME("patient"."hospitaladmittime", 'start of month') AND STRFTIME('%y', "patient"."hospitaladmittime") <= '2104' WHERE "diagnosis"."diagnosisname" = 'intracranial injury - with concussion' AND STRFTIME('%y', "diagnosis"."diagnosistime") <= '2104') | 0.875977 |
CREATE TABLE movie (director VARCHAR, YEAR VARCHAR)
| Show all director names who have a movie in the year 1999 or 2000. | SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000 | SELECT "director" FROM "movie" WHERE "YEAR" = 1999 OR "YEAR" = 2000 | 0.06543 |
CREATE TABLE table_62878 ("Team" TEXT, "Matches" FLOAT, "Wins" FLOAT, "Wins %" TEXT, "Draws" FLOAT, "Draws %" TEXT, "Losses" FLOAT, "Losses %" TEXT, "Against" FLOAT, "For & Against Ratio" TEXT)
| What is the sum on wins with an against ratio of 0.83, and more than 1 loss? | SELECT SUM("Wins") FROM table_62878 WHERE "For & Against Ratio" = '0.83' AND "Losses" > '1' | SELECT SUM("Wins") FROM "table_62878" WHERE "For & Against Ratio" = '0.83' AND "Losses" > '1' | 0.09082 |
CREATE TABLE table_50869 ("Round" TEXT, "Location" TEXT, "Circuit" TEXT, "Date" TEXT, "Winning Driver" TEXT)
| What was the round number for March 22? | SELECT "Round" FROM table_50869 WHERE "Date" = 'march 22' | SELECT "Round" FROM "table_50869" WHERE "Date" = 'march 22' | 0.057617 |
CREATE TABLE table_name_83 (date VARCHAR, away_team VARCHAR)
| When was the game at Essendon? | SELECT date FROM table_name_83 WHERE away_team = "essendon" | SELECT "date" FROM "table_name_83" WHERE "away_team" = "essendon" | 0.063477 |
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
| Top 20 posts and the scores. | SELECT ViewCount, Score, Id AS "post_link" FROM Posts ORDER BY ViewCount DESC LIMIT 20 | SELECT "ViewCount", "Score", "Id" AS "post_link" FROM "Posts" ORDER BY "ViewCount" DESC NULLS LAST LIMIT 20 | 0.104492 |
CREATE TABLE table_59900 ("Place" TEXT, "Player" TEXT, "Country" TEXT, "Score" TEXT, "To par" TEXT, "Money ( $ ) " FLOAT)
| What country was Jay Haas representing? | SELECT "Country" FROM table_59900 WHERE "Player" = 'jay haas' | SELECT "Country" FROM "table_59900" WHERE "Player" = 'jay haas' | 0.061523 |
CREATE TABLE jobs (JOB_ID VARCHAR, JOB_TITLE VARCHAR, MIN_SALARY DECIMAL, MAX_SALARY DECIMAL)
CREATE TABLE departments (DEPARTMENT_ID DECIMAL, DEPARTMENT_NAME VARCHAR, MANAGER_ID DECIMAL, LOCATION_ID DECIMAL)
CREATE TABLE locations (LOCATION_ID DECIMAL, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR, COUNTRY_ID VARCHAR)
CREATE TABLE job_history (EMPLOYEE_ID DECIMAL, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR, DEPARTMENT_ID DECIMAL)
CREATE TABLE regions (REGION_ID DECIMAL, REGION_NAME VARCHAR)
CREATE TABLE employees (EMPLOYEE_ID DECIMAL, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR, SALARY DECIMAL, COMMISSION_PCT DECIMAL, MANAGER_ID DECIMAL, DEPARTMENT_ID DECIMAL)
CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DECIMAL)
| For those employees who did not have any job in the past, a scatter chart shows the correlation between salary and commission_pct . | SELECT SALARY, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | SELECT "SALARY", "COMMISSION_PCT" FROM "employees" WHERE NOT "EMPLOYEE_ID" IN (SELECT "EMPLOYEE_ID" FROM "job_history") | 0.116211 |
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
| when was the first time during the last year that patient 19040 was diagnosed with aphasia? | SELECT diagnoses_icd.charttime FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'aphasia') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19040) AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY diagnoses_icd.charttime LIMIT 1 | WITH "_u_1" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 19040 GROUP BY "hadm_id") SELECT "diagnoses_icd"."charttime" FROM "diagnoses_icd" JOIN "d_icd_diagnoses" ON "d_icd_diagnoses"."icd9_code" = "diagnoses_icd"."icd9_code" AND "d_icd_diagnoses"."short_title" = 'aphasia' LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "diagnoses_icd"."hadm_id" WHERE DATETIME("diagnoses_icd"."charttime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND NOT "_u_1"."" IS NULL ORDER BY "diagnoses_icd"."charttime" NULLS FIRST LIMIT 1 | 0.566406 |
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
| what was the amount of inputs patient 26286 had received on this month/12? | SELECT SUM(inputevents_cv.amount) 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 = 26286)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', inputevents_cv.charttime) = '12' | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 26286 GROUP BY "hadm_id"), "_u_1" AS (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "icustays"."hadm_id" WHERE NOT "_u_0"."" IS NULL GROUP BY "icustay_id") SELECT SUM("inputevents_cv"."amount") FROM "inputevents_cv" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "inputevents_cv"."icustay_id" WHERE DATETIME("inputevents_cv"."charttime", 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND NOT "_u_1"."" IS NULL AND STRFTIME('%d', "inputevents_cv"."charttime") = '12' | 0.615234 |
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
| has patient 028-42654 been given a laboratory test until 54 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 = '028-42654')) AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-54 month') | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '028-42654' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" AS "_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" AS "_u_1" ON "_u_1"."" = "lab"."patientunitstayid" WHERE DATETIME("lab"."labresulttime") <= DATETIME(CURRENT_TIME(), '-54 month') AND NOT "_u_1"."" IS NULL | 0.547852 |
CREATE TABLE table_3820 ("Team" TEXT, "Outgoing manager" TEXT, "Manner of departure" TEXT, "Date of vacancy" TEXT, "Replaced by" TEXT, "Date of appointment" TEXT, "Position in table" TEXT)
| Name the total number of outgoing manager for villarreal b | SELECT COUNT("Outgoing manager") FROM table_3820 WHERE "Team" = 'Villarreal B' | SELECT COUNT("Outgoing manager") FROM "table_3820" WHERE "Team" = 'Villarreal B' | 0.078125 |
CREATE TABLE table_13480122_5 (high_rebounds VARCHAR, high_assists VARCHAR)
| who is the the high rebounds with high assbeingts being scottie pippen (9) | SELECT high_rebounds FROM table_13480122_5 WHERE high_assists = "Scottie Pippen (9)" | SELECT "high_rebounds" FROM "table_13480122_5" WHERE "Scottie Pippen (9)" = "high_assists" | 0.087891 |
CREATE TABLE Tryout (pID DECIMAL, cName VARCHAR, pPos VARCHAR, decision VARCHAR)
CREATE TABLE Player (pID DECIMAL, pName VARCHAR, yCard VARCHAR, HS DECIMAL)
CREATE TABLE College (cName VARCHAR, state VARCHAR, enr DECIMAL)
| Show minimal enr from each state, show from low to high by the Y-axis. | SELECT state, MIN(enr) FROM College GROUP BY state ORDER BY MIN(enr) | SELECT "state", MIN("enr") FROM "College" GROUP BY "state" ORDER BY MIN("enr") NULLS FIRST | 0.087891 |
CREATE TABLE basketball_match (Team_ID INT, School_ID INT, Team_Name TEXT, ACC_Regular_Season TEXT, ACC_Percent TEXT, ACC_Home TEXT, ACC_Road TEXT, All_Games TEXT, All_Games_Percent INT, All_Home TEXT, All_Road TEXT, All_Neutral TEXT)
CREATE TABLE university (School_ID INT, School TEXT, Location TEXT, Founded FLOAT, Affiliation TEXT, Enrollment FLOAT, Nickname TEXT, Primary_conference TEXT)
| Show me about the distribution of ACC_Road and School_ID , and group by attribute ACC_Home in a bar chart, and show x axis in ascending order. | SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road | SELECT "ACC_Road", "School_ID" FROM "basketball_match" GROUP BY "ACC_Home", "ACC_Road" ORDER BY "ACC_Road" NULLS FIRST | 0.115234 |
CREATE TABLE table_8158 ("Team 1" TEXT, "Agg." TEXT, "Team 2" TEXT, "1st leg" TEXT, "2nd leg" TEXT)
| Which 2nd leg has a 1st leg of 2 0? | SELECT "2nd leg" FROM table_8158 WHERE "1st leg" = '2β0' | SELECT "2nd leg" FROM "table_8158" WHERE "1st leg" = '2β0' | 0.056641 |
CREATE TABLE table_name_86 (points INT, match VARCHAR, draw VARCHAR, lost VARCHAR)
| What is the sum of points for teams with more than 10 matches, more than 0 draws, and 7 losses? | SELECT SUM(points) FROM table_name_86 WHERE draw > 0 AND lost = 7 AND match > 10 | SELECT SUM("points") FROM "table_name_86" WHERE "draw" > 0 AND "lost" = 7 AND "match" > 10 | 0.087891 |
CREATE TABLE table_69950 ("Program" TEXT, "Degree" TEXT, "Teaching language" TEXT, "Duration ( years ) " FLOAT, "full-time/part-time" TEXT, "ECTS Credit Points" FLOAT)
| How many ECTS credit points occur with Master in Management? | SELECT COUNT("ECTS Credit Points") FROM table_69950 WHERE "Program" = 'master in management' | SELECT COUNT("ECTS Credit Points") FROM "table_69950" WHERE "Program" = 'master in management' | 0.091797 |
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| Count the number of patients less than 59 years who had a chloride whole blood lab test done. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "59" AND lab.label = "Chloride, Whole Blood" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "Chloride, Whole Blood" = "lab"."label" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "59" > "demographic"."age" | 0.196289 |
CREATE TABLE table_train_208 ("id" INT, "anemia" BOOLEAN, "serum_bicarbonate" INT, "hemoglobin_a1c_hba1c" FLOAT, "temperature" FLOAT, "dementia" BOOLEAN, "electrolyte_imbalances" BOOLEAN, "impaired_sensorium" BOOLEAN, "age" FLOAT, "NOUSE" FLOAT)
| presence of significant anemia ( hemoglobin < 11 g / dl ) | SELECT * FROM table_train_208 WHERE anemia = 1 OR hemoglobin_a1c_hba1c < 11 | SELECT * FROM "table_train_208" WHERE "anemia" = 1 OR "hemoglobin_a1c_hba1c" < 11 | 0.079102 |
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
| how many hours have passed since the first time patient 71689 stayed in careunit sicu in the current hospital encounter. | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 71689 AND admissions.dischtime IS NULL) AND transfers.careunit = 'sicu' ORDER BY transfers.intime LIMIT 1 | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."dischtime" IS NULL AND "admissions"."subject_id" = 71689 GROUP BY "hadm_id") SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', "transfers"."intime")) FROM "transfers" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "transfers"."hadm_id" WHERE "transfers"."careunit" = 'sicu' AND NOT "_u_0"."" IS NULL ORDER BY "transfers"."intime" NULLS FIRST LIMIT 1 | 0.428711 |
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE course_tags_count (course_id INT, clear_grading INT, pop_quiz INT, group_projects INT, inspirational INT, long_lectures INT, extra_credit INT, few_tests INT, good_feedback INT, tough_tests INT, heavy_papers INT, cares_for_students INT, heavy_assignments INT, respected INT, participation INT, heavy_reading INT, tough_grader INT, hilarious INT, would_take_again INT, good_lecture INT, no_skip INT)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE student_record (student_id INT, course_id INT, semester INT, grade VARCHAR, how VARCHAR, transfer_source VARCHAR, earn_credit VARCHAR, repeat_term VARCHAR, test_id VARCHAR)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
| What prereqs are there for the course where Pearl Kelly is the GSI ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.pre_course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.course_id INNER JOIN course_offering ON COURSE_1.course_id = course_offering.course_id INNER JOIN gsi ON gsi.course_offering_id = course_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id WHERE student.firstname LIKE 'Pearl' AND student.lastname LIKE 'Kelly' | SELECT DISTINCT "COURSE_0"."department", "COURSE_0"."name", "COURSE_0"."number" FROM "course" AS "COURSE_0" JOIN "course_prerequisite" ON "COURSE_0"."course_id" = "course_prerequisite"."pre_course_id" JOIN "course" AS "COURSE_1" ON "COURSE_1"."course_id" = "course_prerequisite"."course_id" JOIN "course_offering" ON "COURSE_1"."course_id" = "course_offering"."course_id" JOIN "gsi" ON "course_offering"."offering_id" = "gsi"."course_offering_id" JOIN "student" ON "gsi"."student_id" = "student"."student_id" AND "student"."firstname" LIKE 'Pearl' AND "student"."lastname" LIKE 'Kelly' | 0.571289 |
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
| what is the date of birth and admission time of subject name jerry deberry? | SELECT demographic.dob, demographic.admittime FROM demographic WHERE demographic.name = "Jerry Deberry" | SELECT "demographic"."dob", "demographic"."admittime" FROM "demographic" WHERE "Jerry Deberry" = "demographic"."name" | 0.114258 |
CREATE TABLE Customer_Orders (order_id INT, customer_id INT, order_date DATETIME, order_status_code VARCHAR)
CREATE TABLE Order_Items (order_item_id INT, order_id INT, product_id INT, order_quantity VARCHAR)
CREATE TABLE Products (product_id INT, product_type_code VARCHAR, product_name VARCHAR, product_price DOUBLE)
CREATE TABLE Customer_Address_History (customer_id INT, address_id INT, date_from DATETIME, date_to DATETIME)
CREATE TABLE Contacts (contact_id INT, customer_id INT, gender VARCHAR, first_name VARCHAR, last_name VARCHAR, contact_phone VARCHAR)
CREATE TABLE Addresses (address_id INT, line_1_number_building VARCHAR, city VARCHAR, zip_postcode VARCHAR, state_province_county VARCHAR, country VARCHAR)
CREATE TABLE Customers (customer_id INT, payment_method_code VARCHAR, customer_number VARCHAR, customer_name VARCHAR, customer_address VARCHAR, customer_phone VARCHAR, customer_email VARCHAR)
| Show the number of products with price higher than 1000 or lower than 500 for each product type code in a bar chart, rank x-axis in ascending order. | SELECT product_type_code, COUNT(product_type_code) FROM Products WHERE product_price > 1000 OR product_price < 500 GROUP BY product_type_code ORDER BY product_type_code | SELECT "product_type_code", COUNT("product_type_code") FROM "Products" WHERE "product_price" < 500 OR "product_price" > 1000 GROUP BY "product_type_code" ORDER BY "product_type_code" NULLS FIRST | 0.189453 |
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE student_record (student_id INT, course_id INT, semester INT, grade VARCHAR, how VARCHAR, transfer_source VARCHAR, earn_credit VARCHAR, repeat_term VARCHAR, test_id VARCHAR)
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE course_tags_count (course_id INT, clear_grading INT, pop_quiz INT, group_projects INT, inspirational INT, long_lectures INT, extra_credit INT, few_tests INT, good_feedback INT, tough_tests INT, heavy_papers INT, cares_for_students INT, heavy_assignments INT, respected INT, participation INT, heavy_reading INT, tough_grader INT, hilarious INT, would_take_again INT, good_lecture INT, no_skip INT)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
| After 21:45 P.M. , is there a section of RCHUMS 320 ? | SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '21:45' AND course.course_id = course_offering.course_id AND course.department = 'RCHUMS' AND course.number = 320 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | SELECT DISTINCT "course_offering"."end_time", "course_offering"."section_number", "course_offering"."start_time" FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" AND "course_offering"."start_time" > '21:45' JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" = 'WN' AND "semester"."year" = 2016 WHERE "course"."department" = 'RCHUMS' AND "course"."number" = 320 | 0.443359 |
CREATE TABLE table_38178 ("Round" TEXT, "Venue" TEXT, "Discipline" TEXT, "Date" TEXT, "Winner" TEXT, "Second" TEXT, "Third" TEXT)
| What was the venue with a 3.3km c prologue discipline? | SELECT "Venue" FROM table_38178 WHERE "Discipline" = '3.3km c prologue' | SELECT "Venue" FROM "table_38178" WHERE "Discipline" = '3.3km c prologue' | 0.071289 |
CREATE TABLE table_47654 ("Pick #" FLOAT, "NFL Team" TEXT, "Player" TEXT, "Position" TEXT, "College" TEXT)
| Which NFL team has a player that came from a college in Washington? | SELECT "NFL Team" FROM table_47654 WHERE "College" = 'washington' | SELECT "NFL Team" FROM "table_47654" WHERE "College" = 'washington' | 0.06543 |
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
| look for the number of emergency hospital admitted patients who had cont inv mec ven 96+ hrs as short title of procedure . | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Cont inv mec ven 96+ hrs" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "Cont inv mec ven 96+ hrs" = "procedures"."short_title" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "EMERGENCY" = "demographic"."admission_type" | 0.243164 |
CREATE TABLE table_17510 ("Overall Pick #" FLOAT, "AFL Team" TEXT, "Player" TEXT, "Position" TEXT, "College" TEXT)
| What position does Syracuse's player have? | SELECT "Position" FROM table_17510 WHERE "College" = 'Syracuse' | SELECT "Position" FROM "table_17510" WHERE "College" = 'Syracuse' | 0.063477 |
CREATE TABLE table_name_40 (tries INT, points VARCHAR, goals VARCHAR, position VARCHAR)
| Tell me the lowest tries for goals more than 0 with centre position and points less than 54 | SELECT MIN(tries) FROM table_name_40 WHERE goals > 0 AND position = "centre" AND points < 54 | SELECT MIN("tries") FROM "table_name_40" WHERE "centre" = "position" AND "goals" > 0 AND "points" < 54 | 0.099609 |
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
| what is discharge time of subject name stephanie suchan? | SELECT demographic.dischtime FROM demographic WHERE demographic.name = "Stephanie Suchan" | SELECT "demographic"."dischtime" FROM "demographic" WHERE "Stephanie Suchan" = "demographic"."name" | 0.09668 |
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| provide the number of patients whose item id is 51222 and lab test abnormal status is abnormal? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51222" AND lab.flag = "abnormal" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "51222" = "lab"."itemid" AND "abnormal" = "lab"."flag" AND "demographic"."hadm_id" = "lab"."hadm_id" | 0.178711 |
CREATE TABLE table_name_9 (founded INT, municipality VARCHAR, population__2010_ VARCHAR)
| In what year was Yauco, which had over 42,043 people in 2010, founded? | SELECT AVG(founded) FROM table_name_9 WHERE municipality = "yauco" AND population__2010_ > 42 OFFSET 043 | SELECT AVG("founded") FROM "table_name_9" WHERE "municipality" = "yauco" AND "population__2010_" > 42 OFFSET 043 | 0.109375 |
CREATE TABLE table_name_61 (country VARCHAR, time VARCHAR)
| What country has a time of 8:03.61? | SELECT country FROM table_name_61 WHERE time = "8:03.61" | SELECT "country" FROM "table_name_61" WHERE "8:03.61" = "time" | 0.060547 |
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE student_record (student_id INT, course_id INT, semester INT, grade VARCHAR, how VARCHAR, transfer_source VARCHAR, earn_credit VARCHAR, repeat_term VARCHAR, test_id VARCHAR)
CREATE TABLE course_tags_count (course_id INT, clear_grading INT, pop_quiz INT, group_projects INT, inspirational INT, long_lectures INT, extra_credit INT, few_tests INT, good_feedback INT, tough_tests INT, heavy_papers INT, cares_for_students INT, heavy_assignments INT, respected INT, participation INT, heavy_reading INT, tough_grader INT, hilarious INT, would_take_again INT, good_lecture INT, no_skip INT)
| Is NEAREAST 256 a required prerequisite for any class ? | SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_0.department = 'NEAREAST' AND COURSE_0.number = 256 AND COURSE_1.course_id = course_prerequisite.course_id | SELECT DISTINCT "COURSE_1"."department", "COURSE_1"."name", "COURSE_1"."number" FROM "course" AS "COURSE_0" JOIN "course_prerequisite" ON "COURSE_0"."course_id" = "course_prerequisite"."pre_course_id" JOIN "course" AS "COURSE_1" ON "COURSE_1"."course_id" = "course_prerequisite"."course_id" WHERE "COURSE_0"."department" = 'NEAREAST' AND "COURSE_0"."number" = 256 | 0.354492 |
CREATE TABLE table_1226250_1 (bleeding_time VARCHAR, condition VARCHAR)
| What kind of bleeding does aspirin cause? | SELECT bleeding_time FROM table_1226250_1 WHERE condition = "Aspirin" | SELECT "bleeding_time" FROM "table_1226250_1" WHERE "Aspirin" = "condition" | 0.073242 |
CREATE TABLE table_25647137_2 (points VARCHAR, player VARCHAR)
| How many points did art renner have? | SELECT COUNT(points) FROM table_25647137_2 WHERE player = "Art Renner" | SELECT COUNT("points") FROM "table_25647137_2" WHERE "Art Renner" = "player" | 0.074219 |
CREATE TABLE table_name_54 (a_league VARCHAR, finals VARCHAR, name VARCHAR)
| What A-League has 6 (1) for the finals, and leigh broxham as the name? | SELECT a_league FROM table_name_54 WHERE finals = "6 (1)" AND name = "leigh broxham" | SELECT "a_league" FROM "table_name_54" WHERE "6 (1)" = "finals" AND "leigh broxham" = "name" | 0.089844 |
CREATE TABLE cinema (Cinema_ID INT, Name TEXT, Openning_year INT, Capacity INT, Location TEXT)
CREATE TABLE film (Film_ID INT, Rank_in_series INT, Number_in_season INT, Title TEXT, Directed_by TEXT, Original_air_date TEXT, Production_code TEXT)
CREATE TABLE schedule (Cinema_ID INT, Film_ID INT, Date TEXT, Show_times_per_day INT, Price FLOAT)
| Give me a histogram for what is total number of show times per dat for each cinema?, and show show times per day in asc order please. | SELECT Name, SUM(T1.Show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.Cinema_ID = T2.Cinema_ID GROUP BY T1.Cinema_ID ORDER BY SUM(T1.Show_times_per_day) | SELECT "Name", SUM("T1"."Show_times_per_day") FROM "schedule" AS "T1" JOIN "cinema" AS "T2" ON "T1"."Cinema_ID" = "T2"."Cinema_ID" GROUP BY "T1"."Cinema_ID" ORDER BY SUM("T1"."Show_times_per_day") NULLS FIRST | 0.203125 |
CREATE TABLE table_name_58 (points_against VARCHAR, club VARCHAR)
| What is the Points against for the ystradgynlais rfc club? | SELECT points_against FROM table_name_58 WHERE club = "ystradgynlais rfc" | SELECT "points_against" FROM "table_name_58" WHERE "club" = "ystradgynlais rfc" | 0.077148 |
CREATE TABLE Products (Product_Name VARCHAR, Product_Type_Code VARCHAR)
| What are the names and type codes of products? | SELECT Product_Name, Product_Type_Code FROM Products | SELECT "Product_Name", "Product_Type_Code" FROM "Products" | 0.056641 |
CREATE TABLE table_name_5 (year INT, album VARCHAR)
| What is the total years for roots and branches? | SELECT SUM(year) FROM table_name_5 WHERE album = "roots and branches" | SELECT SUM("year") FROM "table_name_5" WHERE "album" = "roots and branches" | 0.073242 |
CREATE TABLE table_name_48 (name VARCHAR, employed VARCHAR)
| What is the name of the person employed 1970 2005? | SELECT name FROM table_name_48 WHERE employed = "1970β2005" | SELECT "name" FROM "table_name_48" WHERE "1970β2005" = "employed" | 0.063477 |
CREATE TABLE table_name_25 (record VARCHAR, week VARCHAR, opponent VARCHAR)
| What is the Record in a week later than 7 against the San Diego Chargers? | SELECT record FROM table_name_25 WHERE week > 7 AND opponent = "san diego chargers" | SELECT "record" FROM "table_name_25" WHERE "opponent" = "san diego chargers" AND "week" > 7 | 0.088867 |
CREATE TABLE table_7065 ("Institution" TEXT, "Location" TEXT, "Founded" FLOAT, "Affiliation" TEXT, "Enrollment" FLOAT, "Team Nickname" TEXT, "Primary conference" TEXT)
| The Loggers are part of what Primary Conference? | SELECT "Primary conference" FROM table_7065 WHERE "Team Nickname" = 'loggers' | SELECT "Primary conference" FROM "table_7065" WHERE "Team Nickname" = 'loggers' | 0.077148 |
CREATE TABLE table_name_75 (number INT, song_title VARCHAR)
| What is the average number for the song 'O Sudha'? | SELECT AVG(number) FROM table_name_75 WHERE song_title = "o sudha" | SELECT AVG("number") FROM "table_name_75" WHERE "o sudha" = "song_title" | 0.070313 |
CREATE TABLE table_26391 ("Branding" TEXT, "Callsign" TEXT, "Frequency" TEXT, "Power kW" TEXT, "Coverage" TEXT)
| How many power kw have a frequency of 93.7 mhz? | SELECT COUNT("Power kW") FROM table_26391 WHERE "Frequency" = '93.7 MHz' | SELECT COUNT("Power kW") FROM "table_26391" WHERE "Frequency" = '93.7 MHz' | 0.072266 |
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
| Selection of questions with confusing comment / close reason. The following set of questions (on P.SE) where closed in recent history, have the same comment (close reason in data.SE), and yet are different close reasons on the site. | SELECT q.Id AS "post_link", q.ClosedDate, ph.Comment, 'text' FROM Posts AS q JOIN PostHistory AS ph ON (q.Id = ph.PostId) WHERE ph.PostHistoryTypeId = 10 AND ph.Comment = 102 AND q.Id IN (213960, 213983, 140658, 214117, 10920) | SELECT "q"."Id" AS "post_link", "q"."ClosedDate", "ph"."Comment", 'text' FROM "Posts" AS "q" JOIN "PostHistory" AS "ph" ON "ph"."Comment" = 102 AND "ph"."PostHistoryTypeId" = 10 AND "ph"."PostId" = "q"."Id" WHERE "q"."Id" IN (213960, 213983, 140658, 214117, 10920) | 0.257813 |
CREATE TABLE table_14876 ("Year" FLOAT, "Entrant" TEXT, "Chassis" TEXT, "Engine" TEXT, "Points" FLOAT)
| What are the lowest points past the year 1978? | SELECT MIN("Points") FROM table_14876 WHERE "Year" > '1978' | SELECT MIN("Points") FROM "table_14876" WHERE "Year" > '1978' | 0.05957 |
CREATE TABLE table_7797 ("Name" TEXT, "Gain" FLOAT, "Loss" FLOAT, "Long" FLOAT, "Avg/G" FLOAT)
| What was Rock Cartwright's highest long with more than 11 losses? | SELECT AVG("Long") FROM table_7797 WHERE "Name" = 'rock cartwright' AND "Loss" > '11' | SELECT AVG("Long") FROM "table_7797" WHERE "Loss" > '11' AND "Name" = 'rock cartwright' | 0.084961 |
CREATE TABLE climber (Climber_ID INT, Name TEXT, Country TEXT, Time TEXT, Points FLOAT, Mountain_ID INT)
CREATE TABLE mountain (Mountain_ID INT, Name TEXT, Height FLOAT, Prominence FLOAT, Range TEXT, Country TEXT)
| A bar chart about what are the names of climbers and the corresponding heights of the mountains that they climb?, display in desc by the bars please. | SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Name DESC | SELECT "T1"."Name", "T2"."Height" FROM "climber" AS "T1" JOIN "mountain" AS "T2" ON "T1"."Mountain_ID" = "T2"."Mountain_ID" ORDER BY "T1"."Name" DESC NULLS LAST | 0.15625 |
CREATE TABLE table_71621 ("Rank" TEXT, "Region" TEXT, "Total GDP ( \\u20ac bn ) " TEXT, "% growth" TEXT, "Per capita" TEXT)
| Which rank has a Total GDP ( bn) of 11.243?? | SELECT "Rank" FROM table_71621 WHERE "Total GDP (\u20ac bn )" = 'β¬11.243' | SELECT "Rank" FROM "table_71621" WHERE "Total GDP (\u20ac bn )" = 'β¬11.243' | 0.073242 |
CREATE TABLE table_name_3 (death VARCHAR, birth VARCHAR)
| When did the person die who was born on 18 november 1630? | SELECT death FROM table_name_3 WHERE birth = "18 november 1630" | SELECT "death" FROM "table_name_3" WHERE "18 november 1630" = "birth" | 0.067383 |
CREATE TABLE airline (airline_code VARCHAR, airline_name TEXT, note TEXT)
CREATE TABLE aircraft (aircraft_code VARCHAR, aircraft_description VARCHAR, manufacturer VARCHAR, basic_type VARCHAR, engines INT, propulsion VARCHAR, wide_body VARCHAR, wing_span INT, length INT, weight INT, capacity INT, pay_load INT, cruising_speed INT, range_miles INT, pressurized VARCHAR)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
CREATE TABLE code_description (code VARCHAR, description TEXT)
CREATE TABLE fare_basis (fare_basis_code TEXT, booking_class TEXT, class_type TEXT, premium TEXT, economy TEXT, discounted TEXT, night TEXT, season TEXT, basis_days TEXT)
CREATE TABLE city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE airport (airport_code VARCHAR, airport_name TEXT, airport_location TEXT, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR, minimum_connect_time INT)
CREATE TABLE food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
CREATE TABLE flight_fare (flight_id INT, fare_id INT)
CREATE TABLE restriction (restriction_code TEXT, advance_purchase INT, stopovers TEXT, saturday_stay_required TEXT, minimum_stay INT, maximum_stay INT, application TEXT, no_discounts TEXT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR, aircraft_code VARCHAR)
CREATE TABLE dual_carrier (main_airline VARCHAR, low_flight_number INT, high_flight_number INT, dual_airline VARCHAR, service_name TEXT)
CREATE TABLE flight_stop (flight_id INT, stop_number INT, stop_days TEXT, stop_airport TEXT, arrival_time INT, arrival_airline TEXT, arrival_flight_number INT, departure_time INT, departure_airline TEXT, departure_flight_number INT, stop_time INT)
CREATE TABLE ground_service (city_code TEXT, airport_code TEXT, transport_type TEXT, ground_fare INT)
CREATE TABLE airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
CREATE TABLE month (month_number INT, month_name TEXT)
CREATE TABLE flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE flight (aircraft_code_sequence TEXT, airline_code VARCHAR, airline_flight TEXT, arrival_time INT, connections INT, departure_time INT, dual_carrier TEXT, flight_days TEXT, flight_id INT, flight_number INT, from_airport VARCHAR, meal_code TEXT, stops INT, time_elapsed INT, to_airport VARCHAR)
CREATE TABLE days (days_code VARCHAR, day_name VARCHAR)
CREATE TABLE class_of_service (booking_class VARCHAR, rank INT, class_description TEXT)
CREATE TABLE fare (fare_id INT, from_airport VARCHAR, to_airport VARCHAR, fare_basis_code TEXT, fare_airline TEXT, restriction_code TEXT, one_direction_cost INT, round_trip_cost INT, round_trip_required VARCHAR)
CREATE TABLE compartment_class (compartment VARCHAR, class_type VARCHAR)
CREATE TABLE time_interval (period TEXT, begin_time INT, end_time INT)
| please find the earliest possible flight from BOSTON to DENVER | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, flight AS FLIGHTalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'BOSTON' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'DENVER' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) | WITH "_u_0" AS (SELECT MIN("FLIGHTalias1"."departure_time") FROM "airport_service" AS "AIRPORT_SERVICEalias2" JOIN "city" AS "CITYalias2" ON "AIRPORT_SERVICEalias2"."city_code" = "CITYalias2"."city_code" AND "CITYalias2"."city_name" = 'BOSTON' JOIN "flight" AS "FLIGHTalias1" ON "AIRPORT_SERVICEalias2"."airport_code" = "FLIGHTalias1"."from_airport" JOIN "airport_service" AS "AIRPORT_SERVICEalias3" ON "AIRPORT_SERVICEalias3"."airport_code" = "FLIGHTalias1"."to_airport" JOIN "city" AS "CITYalias3" ON "AIRPORT_SERVICEalias3"."city_code" = "CITYalias3"."city_code" AND "CITYalias3"."city_name" = 'DENVER') SELECT DISTINCT "flight"."flight_id" FROM "airport_service" AS "AIRPORT_SERVICE_0" JOIN "city" AS "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" JOIN "airport_service" AS "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "flight"."departure_time" JOIN "city" AS "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'DENVER' | 1.146484 |
CREATE TABLE table_name_9 (took_office INT, deputy_prime_minister VARCHAR)
| What year did deputy prime minister Mariano Rajoy Brey take office? | SELECT SUM(took_office) FROM table_name_9 WHERE deputy_prime_minister = "mariano rajoy brey" | SELECT SUM("took_office") FROM "table_name_9" WHERE "deputy_prime_minister" = "mariano rajoy brey" | 0.095703 |
CREATE TABLE table_name_93 (against INT, byes INT)
| What was the against were there were less than 3 byes? | SELECT AVG(against) FROM table_name_93 WHERE byes < 3 | SELECT AVG("against") FROM "table_name_93" WHERE "byes" < 3 | 0.057617 |
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
| Top 40 users from Bangladesh. 'dhaka' also included in the query. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%bangladesh%' OR LOWER(Location) LIKE '%dhaka%' OR UPPER(Location) LIKE 'BD' ORDER BY Reputation DESC LIMIT 40 | SELECT ROW_NUMBER() OVER (ORDER BY "Reputation" DESC NULLS LAST) AS "#", "Id" AS "user_link", "Reputation" FROM "Users" WHERE LOWER("Location") LIKE '%bangladesh%' OR LOWER("Location") LIKE '%dhaka%' OR UPPER("Location") LIKE 'BD' ORDER BY "Reputation" DESC NULLS LAST LIMIT 40 | 0.270508 |
CREATE TABLE table_13351 ("Parameter" TEXT, "Symbol" TEXT, "Best fit ( WMAP only ) " TEXT, "Best fit ( WMAP , extra parameter ) " TEXT, "Best fit ( all data ) " TEXT)
| What is the best fit (all data) when the best fit (WMAP, extra parameter) shows ? | SELECT "Best fit (all data)" FROM table_13351 WHERE "Best fit (WMAP, extra parameter)" = 'β' | SELECT "Best fit (all data)" FROM "table_13351" WHERE "Best fit (WMAP, extra parameter)" = 'β' | 0.091797 |
CREATE TABLE table_39682 ("Year" TEXT, "Title" TEXT, "Role" TEXT, "Language" TEXT, "Notes" TEXT)
| What was the role in 1996? | SELECT "Role" FROM table_39682 WHERE "Year" = '1996' | SELECT "Role" FROM "table_39682" WHERE "Year" = '1996' | 0.052734 |
CREATE TABLE table_23004 ("House name" TEXT, "House mascot" TEXT, "House colour" TEXT, "Year opened" FLOAT, "House leader" TEXT)
| What is the house colour associated with the house name of Kupe? | SELECT "House colour" FROM table_23004 WHERE "House name" = 'Kupe' | SELECT "House colour" FROM "table_23004" WHERE "House name" = 'Kupe' | 0.066406 |
CREATE TABLE table_name_28 (date VARCHAR, circuit VARCHAR)
| When was the circuit portland international raceway? | SELECT date FROM table_name_28 WHERE circuit = "portland international raceway" | SELECT "date" FROM "table_name_28" WHERE "circuit" = "portland international raceway" | 0.083008 |
CREATE TABLE stadium (ID INT, name TEXT, Capacity INT, City TEXT, Country TEXT, Opening_year INT)
CREATE TABLE record (ID INT, Result TEXT, Swimmer_ID INT, Event_ID INT)
CREATE TABLE swimmer (ID INT, name TEXT, Nationality TEXT, meter_100 FLOAT, meter_200 TEXT, meter_300 TEXT, meter_400 TEXT, meter_500 TEXT, meter_600 TEXT, meter_700 TEXT, Time TEXT)
CREATE TABLE event (ID INT, Name TEXT, Stadium_ID INT, Year TEXT)
| Find meter_300 and ID , and visualize them by a bar chart. | SELECT meter_300, ID FROM swimmer | SELECT "meter_300", "ID" FROM "swimmer" | 0.038086 |
CREATE TABLE table_name_39 (all_time INT, amateur_era INT)
| What is the sum of All-Time, when Amateur Era is less than 0? | SELECT SUM(all_time) FROM table_name_39 WHERE amateur_era < 0 | SELECT SUM("all_time") FROM "table_name_39" WHERE "amateur_era" < 0 | 0.06543 |
CREATE TABLE table_name_39 (score VARCHAR, home VARCHAR, date VARCHAR)
| What is the score of the Boston Bruins game from April 11? | SELECT score FROM table_name_39 WHERE home = "boston bruins" AND date = "april 11" | SELECT "score" FROM "table_name_39" WHERE "april 11" = "date" AND "boston bruins" = "home" | 0.087891 |
CREATE TABLE table_name_63 (entrant VARCHAR, chassis VARCHAR, pts VARCHAR, engine VARCHAR)
| Which entrant has fewer than 12 points, a Climax engine, and a Lotus 24 chassis? | SELECT entrant FROM table_name_63 WHERE pts < 12 AND engine = "climax" AND chassis = "lotus 24" | SELECT "entrant" FROM "table_name_63" WHERE "chassis" = "lotus 24" AND "climax" = "engine" AND "pts" < 12 | 0.102539 |