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_203_723 (id DECIMAL, "year" DECIMAL, "song" TEXT, "us hot 100" DECIMAL, "us msr" DECIMAL, "us a.c." DECIMAL, "can" DECIMAL, "uk singles" DECIMAL, "album" TEXT)
| name firehouse 's first single to get reach the top 10 of the us top 100 ? | SELECT "song" FROM table_203_723 WHERE "album" = 'firehouse' AND "us hot 100" < 10 | SELECT "song" FROM "table_203_723" WHERE "album" = 'firehouse' AND "us hot 100" < 10 | 0.082031 |
CREATE TABLE table_27631002_1 (position VARCHAR, series VARCHAR)
| What is the position for the austria formel 3 cup series? | SELECT position FROM table_27631002_1 WHERE series = "Austria Formel 3 Cup" | SELECT "position" FROM "table_27631002_1" WHERE "Austria Formel 3 Cup" = "series" | 0.079102 |
CREATE TABLE table_name_76 (money___ VARCHAR, to_par VARCHAR, player VARCHAR)
| How much total money does player tommy bolt, who has a to par of 9, have? | SELECT COUNT(money___) AS $__ FROM table_name_76 WHERE to_par = 9 AND player = "tommy bolt" | SELECT COUNT("money___") AS $__ FROM "table_name_76" WHERE "player" = "tommy bolt" AND "to_par" = 9 | 0.09668 |
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 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)
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 diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
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 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)
| when was the last time patient 016-13544 was discharged from hospital since 5 years ago? | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '016-13544' AND DATETIME(patient.hospitaldischargetime) >= DATETIME(CURRENT_TIME(), '-5 year') ORDER BY patient.hospitaldischargetime DESC LIMIT 1 | SELECT "patient"."hospitaldischargetime" FROM "patient" WHERE "patient"."uniquepid" = '016-13544' AND DATETIME("patient"."hospitaldischargetime") >= DATETIME(CURRENT_TIME(), '-5 year') ORDER BY "patient"."hospitaldischargetime" DESC NULLS LAST LIMIT 1 | 0.245117 |
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 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)
| what is the number of patients whose death status is 0 and drug name is nitroglycerin sl? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "0" AND prescriptions.drug = "Nitroglycerin SL" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "Nitroglycerin SL" = "prescriptions"."drug" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "0" = "demographic"."expire_flag" | 0.226563 |
CREATE TABLE table_45015 ("Event" TEXT, "Score" FLOAT, "Name" TEXT, "Nation" TEXT, "Games" TEXT, "Date" TEXT)
| For the 27 arrow match event, what's the sum of all scores for that event? | SELECT SUM("Score") FROM table_45015 WHERE "Event" = '27 arrow match' | SELECT SUM("Score") FROM "table_45015" WHERE "Event" = '27 arrow match' | 0.069336 |
CREATE TABLE table_name_91 (win__percentage INT, drawn VARCHAR)
| Name the most win % for 13 drawn | SELECT MAX(win__percentage) FROM table_name_91 WHERE drawn = 13 | SELECT MAX("win__percentage") FROM "table_name_91" WHERE "drawn" = 13 | 0.067383 |
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 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)
| find out the maximum age of patients suffering from acute subdural hematoma who were hospitalized for 8 days. | SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "ACUTE SUBDURAL HEMATOMA" AND demographic.days_stay = "8" | SELECT MAX("demographic"."age") FROM "demographic" WHERE "8" = "demographic"."days_stay" AND "ACUTE SUBDURAL HEMATOMA" = "demographic"."diagnosis" | 0.142578 |
CREATE TABLE table_13183076_3 (us_viewers__million_ VARCHAR, production_code VARCHAR)
| How many U.S. viewers (million) are there for the episode whose Production code is 3T7051? | SELECT us_viewers__million_ FROM table_13183076_3 WHERE production_code = "3T7051" | SELECT "us_viewers__million_" FROM "table_13183076_3" WHERE "3T7051" = "production_code" | 0.085938 |
CREATE TABLE table_28951 ("District" TEXT, "Incumbent" TEXT, "Party" TEXT, "First elected" FLOAT, "Result" TEXT, "Candidates" TEXT)
| If the district is Virginia 17, who are the candidates? | SELECT "Candidates" FROM table_28951 WHERE "District" = 'Virginia 17' | SELECT "Candidates" FROM "table_28951" WHERE "District" = 'Virginia 17' | 0.069336 |
CREATE TABLE table_204_152 (id DECIMAL, "device" TEXT, "type" TEXT, "iops" TEXT, "interface" TEXT, "notes" TEXT)
| name the device above intel x25 e | SELECT "device" FROM table_204_152 WHERE id = (SELECT id FROM table_204_152 WHERE "device" = 'intel x25-e (slc)') - 1 | SELECT "device" FROM "table_204_152" WHERE "id" = (SELECT "id" FROM "table_204_152" WHERE "device" = 'intel x25-e (slc)') - 1 | 0.12207 |
CREATE TABLE procedures_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 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 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 d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title 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 labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name 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 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 inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title 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)
| tell me the number of patients who stayed in ward 52 until 2102? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.wardid = 52 AND STRFTIME('%y', transfers.intime) <= '2102') | WITH "_u_0" AS (SELECT "transfers"."hadm_id" FROM "transfers" WHERE "transfers"."wardid" = 52 AND STRFTIME('%y', "transfers"."intime") <= '2102' GROUP BY "hadm_id") SELECT COUNT(DISTINCT "admissions"."subject_id") FROM "admissions" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "admissions"."hadm_id" WHERE NOT "_u_0"."" IS NULL | 0.316406 |
CREATE TABLE airline (airline_code VARCHAR, airline_name TEXT, note 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 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 time_interval (period TEXT, begin_time INT, end_time INT)
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 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 food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
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 code_description (code VARCHAR, description TEXT)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
CREATE TABLE airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
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 state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
CREATE TABLE flight_fare (flight_id INT, fare_id INT)
CREATE TABLE dual_carrier (main_airline VARCHAR, low_flight_number INT, high_flight_number INT, dual_airline VARCHAR, service_name TEXT)
CREATE TABLE month (month_number INT, month_name TEXT)
CREATE TABLE flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE days (days_code VARCHAR, day_name VARCHAR)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR, aircraft_code VARCHAR)
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)
| list all the airlines flying between WASHINGTON and DENVER | SELECT DISTINCT airline.airline_code FROM airline, 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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.airline_code = airline.airline_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | SELECT DISTINCT "airline"."airline_code" FROM "airline" JOIN "flight" ON "airline"."airline_code" = "flight"."airline_code" JOIN "airport_service" AS "AIRPORT_SERVICE_0" 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 "city" AS "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'WASHINGTON' JOIN "city" AS "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'DENVER' | 0.567383 |
CREATE TABLE PostTypes (Id DECIMAL, Name 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 Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
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 PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId 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 FlagTypes (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 VoteTypes (Id DECIMAL, Name 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 ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId 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 PostHistoryTypes (Id DECIMAL, Name 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 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 TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description 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 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 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 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)
| Prevalence of SQL, Schema, IC. | SELECT COUNT(Id) FROM Posts WHERE (Tags LIKE '%sql%' OR Tags LIKE '%schema%' OR Tags LIKE '%integrity constraint%') | SELECT COUNT("Id") FROM "Posts" WHERE "Tags" LIKE '%integrity constraint%' OR "Tags" LIKE '%schema%' OR "Tags" LIKE '%sql%' | 0.120117 |
CREATE TABLE table_1342149_18 (party VARCHAR, result VARCHAR, district VARCHAR)
| What party's candidate was re-elected in the Louisiana 6 district? | SELECT party FROM table_1342149_18 WHERE result = "Re-elected" AND district = "Louisiana 6" | SELECT "party" FROM "table_1342149_18" WHERE "Louisiana 6" = "district" AND "Re-elected" = "result" | 0.09668 |
CREATE TABLE table_46365 ("Rank" TEXT, "Nation" TEXT, "Gold" FLOAT, "Silver" FLOAT, "Bronze" FLOAT, "Total" FLOAT)
| How many Total medals did the country with 16 Silver and less than 32 Bronze receive? | SELECT MIN("Total") FROM table_46365 WHERE "Silver" = '16' AND "Bronze" < '32' | SELECT MIN("Total") FROM "table_46365" WHERE "Bronze" < '32' AND "Silver" = '16' | 0.078125 |
CREATE TABLE table_25856 ("Game" FLOAT, "Date" TEXT, "Team" TEXT, "Score" TEXT, "High points" TEXT, "High rebounds" TEXT, "High assists" TEXT, "Location Attendance" TEXT, "Series" TEXT)
| Name the date for l 89 92 (ot) | SELECT "Date" FROM table_25856 WHERE "Score" = 'L 89–92 (OT)' | SELECT "Date" FROM "table_25856" WHERE "Score" = 'L 89–92 (OT)' | 0.061523 |
CREATE TABLE table_name_81 (player VARCHAR, college VARCHAR)
| who is the player from arizona state? | SELECT player FROM table_name_81 WHERE college = "arizona state" | SELECT "player" FROM "table_name_81" WHERE "arizona state" = "college" | 0.068359 |
CREATE TABLE table_43264 ("Date" TEXT, "Label" TEXT, "Format" TEXT, "Country" TEXT, "Catalog" TEXT)
| What is the Label that shows on april 7, 1967? | SELECT "Label" FROM table_43264 WHERE "Date" = 'april 7, 1967' | SELECT "Label" FROM "table_43264" WHERE "Date" = 'april 7, 1967' | 0.0625 |
CREATE TABLE table_29717 ("Team" TEXT, "Outgoing manager" TEXT, "Manner of departure" TEXT, "Date of vacancy" TEXT, "Table" TEXT, "Incoming manager" TEXT, "Date of appointment" TEXT)
| What is the outgoing manager when the date of vacancy is 10 october 2010? | SELECT "Outgoing manager" FROM table_29717 WHERE "Date of vacancy" = '10 October 2010' | SELECT "Outgoing manager" FROM "table_29717" WHERE "Date of vacancy" = '10 October 2010' | 0.085938 |
CREATE TABLE airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
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 code_description (code VARCHAR, 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 month (month_number INT, month_name TEXT)
CREATE TABLE state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
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 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 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 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 city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE time_interval (period TEXT, begin_time INT, end_time INT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
CREATE TABLE airline (airline_code VARCHAR, airline_name TEXT, note TEXT)
CREATE TABLE flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
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 class_of_service (booking_class VARCHAR, rank INT, class_description TEXT)
CREATE TABLE compartment_class (compartment VARCHAR, class_type VARCHAR)
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 flight_fare (flight_id INT, fare_id INT)
| which airline is KW | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'KW' | SELECT DISTINCT "airline_code" FROM "airline" WHERE "airline_code" = 'KW' | 0.071289 |
CREATE TABLE Students (personal_name VARCHAR)
| How many students have personal names that contain the word 'son'? | SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | SELECT COUNT(*) FROM "Students" WHERE "personal_name" LIKE "%son%" | 0.064453 |
CREATE TABLE table_203_146 (id DECIMAL, "year" DECIMAL, "association" TEXT, "category" TEXT, "nominated work" TEXT, "result" TEXT)
| how many awards did jones win in 2009 ? | SELECT COUNT(*) FROM table_203_146 WHERE "year" = 2009 AND "result" = 'won' | SELECT COUNT(*) FROM "table_203_146" WHERE "result" = 'won' AND "year" = 2009 | 0.075195 |
CREATE TABLE table_31638 ("Aircraft" TEXT, "Origin" TEXT, "Type" TEXT, "Versions" TEXT, "In service" TEXT)
| How many T-260 EU aircrafts are currently in service? | SELECT "In service" FROM table_31638 WHERE "Versions" = 't-260 eu' | SELECT "In service" FROM "table_31638" WHERE "Versions" = 't-260 eu' | 0.066406 |
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 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)
| specify complete details of icd9 code 4591 | SELECT procedures.short_title, procedures.long_title FROM procedures WHERE procedures.icd9_code = "4591" | SELECT "procedures"."short_title", "procedures"."long_title" FROM "procedures" WHERE "4591" = "procedures"."icd9_code" | 0.115234 |
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)
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 diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| give me the number of patients whose admission year is less than 2162 and item id is 51301? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2162" AND lab.itemid = "51301" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "51301" = "lab"."itemid" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "2162" > "demographic"."admityear" | 0.189453 |
CREATE TABLE table_name_13 (country VARCHAR, score VARCHAR)
| What is Country, when Score is 71-74-70=215? | SELECT country FROM table_name_13 WHERE score = 71 - 74 - 70 = 215 | SELECT "country" FROM "table_name_13" WHERE "score" = FALSE | 0.057617 |
CREATE TABLE Subjects (subject_id INT, subject_name VARCHAR)
CREATE TABLE Student_Course_Enrolment (registration_id INT, student_id INT, course_id INT, date_of_enrolment DATETIME, date_of_completion DATETIME)
CREATE TABLE Courses (course_id INT, author_id INT, subject_id INT, course_name VARCHAR, course_description VARCHAR)
CREATE TABLE Students (student_id INT, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR, password VARCHAR, personal_name VARCHAR, middle_name VARCHAR, family_name VARCHAR)
CREATE TABLE Student_Tests_Taken (registration_id INT, date_test_taken DATETIME, test_result VARCHAR)
CREATE TABLE Course_Authors_and_Tutors (author_id INT, author_tutor_ATB VARCHAR, login_name VARCHAR, password VARCHAR, personal_name VARCHAR, middle_name VARCHAR, family_name VARCHAR, gender_mf VARCHAR, address_line_1 VARCHAR)
| Bar chart of how many date of completion from each date of completion, and could you sort from high to low by the how many date of completion? | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_completion) DESC | SELECT "date_of_completion", COUNT("date_of_completion") FROM "Student_Course_Enrolment" ORDER BY COUNT("date_of_completion") DESC NULLS LAST | 0.137695 |
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE PostTags (PostId DECIMAL, TagId 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 PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense 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 Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount 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 PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewTaskTypes (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 PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description 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 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 PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
| Select posts Tags is null. | SELECT * FROM Posts WHERE Tags LIKE '%javascript%' | SELECT * FROM "Posts" WHERE "Tags" LIKE '%javascript%' | 0.052734 |
CREATE TABLE table_4134 ("Stadium" TEXT, "Location" TEXT, "Opened" FLOAT, "Built for" TEXT, "Capacity at Construction" FLOAT)
| What is the location of the Moorabbin Oval stadium? | SELECT "Location" FROM table_4134 WHERE "Stadium" = 'Moorabbin Oval' | SELECT "Location" FROM "table_4134" WHERE "Stadium" = 'Moorabbin Oval' | 0.068359 |
CREATE TABLE table_70784 ("Lithium" TEXT, "Sodium" TEXT, "Potassium" TEXT, "Rubidium" TEXT, "Caesium" TEXT)
| what is the properties of sodium when rubidium is nacl (2.1)? | SELECT "Sodium" FROM table_70784 WHERE "Rubidium" = 'nacl (2.1)' | SELECT "Sodium" FROM "table_70784" WHERE "Rubidium" = 'nacl (2.1)' | 0.064453 |
CREATE TABLE table_name_42 (archbishop VARCHAR, vacated_throne VARCHAR)
| Which archbishop vacated the throne on May 17, 1907? | SELECT archbishop FROM table_name_42 WHERE vacated_throne = "may 17, 1907" | SELECT "archbishop" FROM "table_name_42" WHERE "may 17, 1907" = "vacated_throne" | 0.078125 |
CREATE TABLE Person (name VARCHAR, age INT, city TEXT, gender TEXT, job TEXT)
CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR, year INT)
| How old is each gender, on average Plot them as bar chart, I want to order by the Y in asc please. | SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY AVG(age) | SELECT "gender", AVG("age") FROM "Person" GROUP BY "gender" ORDER BY AVG("age") NULLS FIRST | 0.088867 |
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 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 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)
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 diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
| when was the first intake time until 03/07/2105 for patient 010-5308? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-5308')) AND intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) <= '2105-03-07' ORDER BY intakeoutput.intakeoutputtime LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '010-5308' 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 "intakeoutput"."intakeoutputtime" FROM "intakeoutput" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "intakeoutput"."patientunitstayid" WHERE "intakeoutput"."cellpath" LIKE '%intake%' AND NOT "_u_1"."" IS NULL AND STRFTIME('%y-%m-%d', "intakeoutput"."intakeoutputtime") <= '2105-03-07' ORDER BY "intakeoutput"."intakeoutputtime" NULLS FIRST LIMIT 1 | 0.69043 |
CREATE TABLE table_name_92 (Id VARCHAR)
| Which 2007 has a 2010 of A? | SELECT 2007 FROM table_name_92 WHERE 2010 = "a" | SELECT 2007 FROM "table_name_92" WHERE "a" = 2010 | 0.047852 |
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 diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime 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 lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime 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)
| how many prescriptions for 30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp have been ordered since 2 years ago? | SELECT COUNT(*) FROM medication WHERE medication.drugname = '30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-2 year') | SELECT COUNT(*) FROM "medication" WHERE "medication"."drugname" = '30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp' AND DATETIME("medication"."drugstarttime") >= DATETIME(CURRENT_TIME(), '-2 year') | 0.209961 |
CREATE TABLE table_64822 ("Name ( pinyin ) " TEXT, "Name ( Wade Giles ) " TEXT, "Characters" TEXT, "Type" TEXT, "Construction" TEXT)
| Who has a Construction of 1873, foochow navy yard? | SELECT "Characters" FROM table_64822 WHERE "Construction" = '1873, foochow navy yard' | SELECT "Characters" FROM "table_64822" WHERE "Construction" = '1873, foochow navy yard' | 0.084961 |
CREATE TABLE table_27624 ("Episode" TEXT, "Theme" TEXT, "Song choice" TEXT, "Original artist" TEXT, "Order #" TEXT, "Result" TEXT)
| What is the song choice where the episode is Live Show 1? | SELECT "Song choice" FROM table_27624 WHERE "Episode" = 'Live Show 1' | SELECT "Song choice" FROM "table_27624" WHERE "Episode" = 'Live Show 1' | 0.069336 |
CREATE TABLE table_203_133 (id DECIMAL, "year" DECIMAL, "japanese title" TEXT, "english title" TEXT, "role" TEXT, "network" TEXT)
| how many roles did actor ikuta toma have in 2009 ? | SELECT COUNT("role") FROM table_203_133 WHERE "year" = 2009 | SELECT COUNT("role") FROM "table_203_133" WHERE "year" = 2009 | 0.05957 |
CREATE TABLE table_608 ("Word number" TEXT, "The Basque of the glossary" TEXT, "Modern Basque" TEXT, "The Icelandic of the glossary" TEXT, "English translation" TEXT)
| Name the incelandic of the glossary for 218 | SELECT "The Icelandic of the glossary" FROM table_608 WHERE "Word number" = '218' | SELECT "The Icelandic of the glossary" FROM "table_608" WHERE "Word number" = '218' | 0.081055 |
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 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 d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
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 chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_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 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 d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
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 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 d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
| when was the first time patient 28443's intake time on this month/23? | SELECT inputevents_cv.charttime 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 = 28443)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', inputevents_cv.charttime) = '23' ORDER BY inputevents_cv.charttime LIMIT 1 | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 28443 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 "inputevents_cv"."charttime" 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") = '23' ORDER BY "inputevents_cv"."charttime" NULLS FIRST LIMIT 1 | 0.669922 |
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 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)
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)
| get me the number of emergency hospital admission patients who have lab test item id 50801. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.itemid = "50801" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "50801" = "lab"."itemid" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "EMERGENCY" = "demographic"."admission_type" | 0.199219 |
CREATE TABLE table_name_5 (heat VARCHAR, country VARCHAR)
| What's the total number of Heat recorded for the british virgin islands? | SELECT COUNT(heat) FROM table_name_5 WHERE country = "british virgin islands" | SELECT COUNT("heat") FROM "table_name_5" WHERE "british virgin islands" = "country" | 0.081055 |
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime 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 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 lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
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)
| when was patient 025-44495 tested for sputum, tracheal specimen microbiology for the last time during this month? | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND microlab.culturesite = 'sputum, tracheal specimen' AND DATETIME(microlab.culturetakentime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY microlab.culturetakentime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '025-44495' 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 "microlab"."culturetakentime" FROM "microlab" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "microlab"."patientunitstayid" WHERE "microlab"."culturesite" = 'sputum, tracheal specimen' AND DATETIME("microlab"."culturetakentime", 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND NOT "_u_1"."" IS NULL ORDER BY "microlab"."culturetakentime" DESC NULLS LAST LIMIT 1 | 0.734375 |
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 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)
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 medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
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)
| retrieve the patient identifications who have been diagnosed with pituitary cushing syndrome until 1 year ago. | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'pituitary cushing syndrome' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year')) | WITH "_u_0" AS (SELECT "diagnosis"."patientunitstayid" FROM "diagnosis" WHERE "diagnosis"."diagnosisname" = 'pituitary cushing syndrome' AND DATETIME("diagnosis"."diagnosistime") <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY "patientunitstayid") SELECT "patient"."uniquepid" FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patientunitstayid" WHERE NOT "_u_0"."" IS NULL | 0.381836 |
CREATE TABLE table_14959 ("Date" TEXT, "Opponent" TEXT, "Score" TEXT, "Loss" TEXT, "Attendance" FLOAT, "Record" TEXT)
| Name the loss for 48-37 | SELECT "Loss" FROM table_14959 WHERE "Record" = '48-37' | SELECT "Loss" FROM "table_14959" WHERE "Record" = '48-37' | 0.055664 |
CREATE TABLE table_28253870_1 (affiliation VARCHAR, enrollment VARCHAR)
| Name the affiliation for 27209 enrollment | SELECT affiliation FROM table_28253870_1 WHERE enrollment = 27209 | SELECT "affiliation" FROM "table_28253870_1" WHERE "enrollment" = 27209 | 0.069336 |
CREATE TABLE table_17477 ("Series #" FLOAT, "Title" TEXT, "Directed by" TEXT, "Written by" TEXT, "Original air date" TEXT, "Production code" TEXT, "U.S. viewers ( millions ) " TEXT)
| What's the total number of episodes with production code 2T6705? | SELECT COUNT("Title") FROM table_17477 WHERE "Production code" = '2T6705' | SELECT COUNT("Title") FROM "table_17477" WHERE "Production code" = '2T6705' | 0.073242 |
CREATE TABLE table_20256 ("English country name" TEXT, "Arabic romanised country name" TEXT, "Arabic country name" TEXT, "English capital name" TEXT, "Arabic romanised capital name" TEXT, "Arabic capital name" TEXT)
| what is the arabic capital name where the english capital name is beirut? | SELECT "Arabic capital name" FROM table_20256 WHERE "English capital name" = 'Beirut' | SELECT "Arabic capital name" FROM "table_20256" WHERE "English capital name" = 'Beirut' | 0.084961 |
CREATE TABLE table_6987 ("Year" TEXT, "Film title used in nomination" TEXT, "Original title" TEXT, "Main Language ( s ) " TEXT, "Result" TEXT)
| What is the primary language used in the film, Black Book? | SELECT "Main Language(s)" FROM table_6987 WHERE "Film title used in nomination" = 'black book' | SELECT "Main Language(s)" FROM "table_6987" WHERE "Film title used in nomination" = 'black book' | 0.09375 |
CREATE TABLE table_name_74 (silver INT, bronze VARCHAR, total VARCHAR, gold VARCHAR)
| With 1 Gold, more than 2 Bronze and Total greater than 1, what is the Silver? | SELECT AVG(silver) FROM table_name_74 WHERE total > 1 AND gold = 1 AND bronze > 2 | SELECT AVG("silver") FROM "table_name_74" WHERE "bronze" > 2 AND "gold" = 1 AND "total" > 1 | 0.088867 |
CREATE TABLE city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE month (month_number INT, month_name TEXT)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR, aircraft_code VARCHAR)
CREATE TABLE compartment_class (compartment VARCHAR, class_type VARCHAR)
CREATE TABLE state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
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 airline (airline_code VARCHAR, airline_name TEXT, note 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 flight_fare (flight_id INT, fare_id INT)
CREATE TABLE code_description (code VARCHAR, description 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 dual_carrier (main_airline VARCHAR, low_flight_number INT, high_flight_number INT, dual_airline VARCHAR, service_name TEXT)
CREATE TABLE days (days_code VARCHAR, day_name VARCHAR)
CREATE TABLE class_of_service (booking_class VARCHAR, rank INT, class_description TEXT)
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 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 flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
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 airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
CREATE TABLE ground_service (city_code TEXT, airport_code TEXT, transport_type TEXT, ground_fare INT)
CREATE TABLE food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
CREATE TABLE time_interval (period TEXT, begin_time INT, end_time INT)
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)
| what are my options for a MINNEAPOLIS back to INDIANAPOLIS flight around noontime | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time <= 1230 AND flight.departure_time >= 1130) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'INDIANAPOLIS' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MINNEAPOLIS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | 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" = 'MINNEAPOLIS' JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" AND "flight"."departure_time" <= 1230 AND "flight"."departure_time" >= 1130 JOIN "airport_service" AS "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" AS "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'INDIANAPOLIS' | 0.577148 |
CREATE TABLE table_49521 ("Date" TEXT, "Visitor" TEXT, "Score" TEXT, "Home" TEXT, "Record" TEXT)
| What is the Visitor on March 31? | SELECT "Visitor" FROM table_49521 WHERE "Date" = 'march 31' | SELECT "Visitor" FROM "table_49521" WHERE "Date" = 'march 31' | 0.05957 |
CREATE TABLE table_70709 ("Model" TEXT, "Specification" TEXT, "Build date" TEXT, "Total produced" FLOAT, "Wheel arrangement" TEXT, "Prime mover" TEXT, "Power output" TEXT)
| Name the build date for total produced of 146 | SELECT "Build date" FROM table_70709 WHERE "Total produced" = '146' | SELECT "Build date" FROM "table_70709" WHERE "Total produced" = '146' | 0.067383 |
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)
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 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)
| provide the number of patients whose admission type is emergency and procedure short title is ins nondrug elut cor st? | 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 = "Ins nondrug elut cor st" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "Ins nondrug elut cor st" = "procedures"."short_title" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "EMERGENCY" = "demographic"."admission_type" | 0.242188 |
CREATE TABLE table_203_254 (id DECIMAL, "position" DECIMAL, "team" TEXT, "points" DECIMAL, "played" DECIMAL, "won" DECIMAL, "drawn" DECIMAL, "lost" DECIMAL, "for" DECIMAL, "against" DECIMAL, "difference" DECIMAL)
| what is the only team to have scored 16 points ? | SELECT "team" FROM table_203_254 WHERE "points" = 16 | SELECT "team" FROM "table_203_254" WHERE "points" = 16 | 0.052734 |
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 cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
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 treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
| count the number of patients who have received a parenteral feeds - tpn procedure in the same hospital encounter after having had a calcium channel blocker procedure since 2105. | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'calcium channel blocker' AND STRFTIME('%y', treatment.treatmenttime) >= '2105') AS t1 JOIN (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'parenteral feeds - tpn' AND STRFTIME('%y', treatment.treatmenttime) >= '2105') AS t2 WHERE t1.treatmenttime < t2.treatmenttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid | WITH "t2" AS (SELECT "treatment"."treatmenttime", "patient"."patienthealthsystemstayid" FROM "treatment" JOIN "patient" ON "patient"."patientunitstayid" = "treatment"."patientunitstayid" WHERE "treatment"."treatmentname" = 'parenteral feeds - tpn' AND STRFTIME('%y', "treatment"."treatmenttime") >= '2105') SELECT COUNT(DISTINCT "patient"."uniquepid") FROM "treatment" JOIN "patient" ON "patient"."patientunitstayid" = "treatment"."patientunitstayid" JOIN "t2" AS "t2" ON "patient"."patienthealthsystemstayid" = "t2"."patienthealthsystemstayid" AND "t2"."treatmenttime" > "treatment"."treatmenttime" WHERE "treatment"."treatmentname" = 'calcium channel blocker' AND STRFTIME('%y', "treatment"."treatmenttime") >= '2105' | 0.702148 |
CREATE TABLE table_204_521 (id DECIMAL, "rank" DECIMAL, "name" TEXT, "nationality" TEXT, "time ( hand ) " TEXT, "notes" TEXT)
| which competitor finished immediately after karl hahnel ? | SELECT "name" FROM table_204_521 WHERE "rank" = (SELECT "rank" FROM table_204_521 WHERE "name" = 'karl hahnel') + 1 | SELECT "name" FROM "table_204_521" WHERE "rank" = (SELECT "rank" FROM "table_204_521" WHERE "name" = 'karl hahnel') + 1 | 0.116211 |
CREATE TABLE table_name_35 (attendance INT, date VARCHAR, week VARCHAR)
| What was the Attendance after Week 4 on October 10, 1971? | SELECT AVG(attendance) FROM table_name_35 WHERE date = "october 10, 1971" AND week > 4 | SELECT AVG("attendance") FROM "table_name_35" WHERE "date" = "october 10, 1971" AND "week" > 4 | 0.091797 |
CREATE TABLE table_name_65 (top_25 INT, wins VARCHAR, events VARCHAR)
| Name the top-25 with wins less than 1 and events of 12 | SELECT SUM(top_25) FROM table_name_65 WHERE wins < 1 AND events = 12 | SELECT SUM("top_25") FROM "table_name_65" WHERE "events" = 12 AND "wins" < 1 | 0.074219 |
CREATE TABLE table_11361 ("Season" FLOAT, "Competition" TEXT, "Round" TEXT, "Club" TEXT, "Home" TEXT, "Away" TEXT)
| What competition did the maccabi haifa fc club play? | SELECT "Competition" FROM table_11361 WHERE "Club" = 'maccabi haifa fc' | SELECT "Competition" FROM "table_11361" WHERE "Club" = 'maccabi haifa fc' | 0.071289 |
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title 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 procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
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 patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod 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 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 cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
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 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 chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
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)
| when was the first time of hospital admission in which patient 17462 was admitted through the transfer from hosp/extram since 2105? | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 17462 AND admissions.admission_location = 'transfer from hosp/extram' AND STRFTIME('%y', admissions.admittime) >= '2105' ORDER BY admissions.admittime LIMIT 1 | SELECT "admissions"."admittime" FROM "admissions" WHERE "admissions"."admission_location" = 'transfer from hosp/extram' AND "admissions"."subject_id" = 17462 AND STRFTIME('%y', "admissions"."admittime") >= '2105' ORDER BY "admissions"."admittime" NULLS FIRST LIMIT 1 | 0.259766 |
CREATE TABLE head (head_ID INT, name TEXT, born_state TEXT, age FLOAT)
CREATE TABLE management (department_ID INT, head_ID INT, temporary_acting TEXT)
CREATE TABLE department (Department_ID INT, Name TEXT, Creation TEXT, Ranking INT, Budget_in_Billions FLOAT, Num_Employees FLOAT)
| Show the average age of heads of departments born in each state with a bar chart, and could you display y-axis in descending order? | SELECT born_state, AVG(age) FROM head GROUP BY born_state ORDER BY AVG(age) DESC | SELECT "born_state", AVG("age") FROM "head" GROUP BY "born_state" ORDER BY AVG("age") DESC NULLS LAST | 0.098633 |
CREATE TABLE weather (date TEXT, max_temperature_f INT, mean_temperature_f INT, min_temperature_f INT, max_dew_point_f INT, mean_dew_point_f INT, min_dew_point_f INT, max_humidity INT, mean_humidity INT, min_humidity INT, max_sea_level_pressure_inches DECIMAL, mean_sea_level_pressure_inches DECIMAL, min_sea_level_pressure_inches DECIMAL, max_visibility_miles INT, mean_visibility_miles INT, min_visibility_miles INT, max_wind_Speed_mph INT, mean_wind_speed_mph INT, max_gust_speed_mph INT, precipitation_inches INT, cloud_cover INT, events TEXT, wind_dir_degrees INT, zip_code INT)
CREATE TABLE trip (id INT, duration INT, start_date TEXT, start_station_name TEXT, start_station_id INT, end_date TEXT, end_station_name TEXT, end_station_id INT, bike_id INT, subscription_type TEXT, zip_code INT)
CREATE TABLE station (id INT, name TEXT, lat DECIMAL, long DECIMAL, dock_count INT, city TEXT, installation_date TEXT)
CREATE TABLE status (station_id INT, bikes_available INT, docks_available INT, time TEXT)
| Show me a line chart of how how many installation date change over the installation date, and could you list from low to high by the X-axis? | SELECT installation_date, COUNT(installation_date) FROM station GROUP BY installation_date ORDER BY installation_date | SELECT "installation_date", COUNT("installation_date") FROM "station" GROUP BY "installation_date" ORDER BY "installation_date" NULLS FIRST | 0.135742 |
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 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)
| count the number of patients whose admission type is emergency and procedure short title is cv cath plcmt w guidance. | 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 = "CV cath plcmt w guidance" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "CV cath plcmt w guidance" = "procedures"."short_title" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "EMERGENCY" = "demographic"."admission_type" | 0.243164 |
CREATE TABLE School (School_id TEXT, School_name TEXT, Location TEXT, Mascot TEXT, Enrollment INT, IHSAA_Class TEXT, IHSAA_Football_Class TEXT, County TEXT)
CREATE TABLE budget (School_id INT, Year INT, Budgeted INT, total_budget_percent_budgeted FLOAT, Invested INT, total_budget_percent_invested FLOAT, Budget_invested_percent TEXT)
CREATE TABLE endowment (endowment_id INT, School_id INT, donator_name TEXT, amount FLOAT)
| Compare the total enrollment in each county with a bar chart, and could you order in desc by the x axis? | SELECT County, SUM(Enrollment) FROM School GROUP BY County ORDER BY County DESC | SELECT "County", SUM("Enrollment") FROM "School" GROUP BY "County" ORDER BY "County" DESC NULLS LAST | 0.097656 |
CREATE TABLE table_7832 ("Team" TEXT, "Head Coach" TEXT, "City" TEXT, "Stadium" TEXT, "Capacity" FLOAT)
| What is the Capacity of Ernst-Abbe-Sportfeld? | SELECT "Capacity" FROM table_7832 WHERE "Stadium" = 'ernst-abbe-sportfeld' | SELECT "Capacity" FROM "table_7832" WHERE "Stadium" = 'ernst-abbe-sportfeld' | 0.074219 |
CREATE TABLE table_2668243_18 (result VARCHAR, first_elected VARCHAR)
| Name the result for first elected being 1798 1825 | SELECT result FROM table_2668243_18 WHERE first_elected = "1798 1825" | SELECT "result" FROM "table_2668243_18" WHERE "1798 1825" = "first_elected" | 0.073242 |
CREATE TABLE table_75813 ("Chord" TEXT, "Root" TEXT, "Major third" TEXT, "Perfect fifth" TEXT, "Minor seventh" TEXT)
| What is the Chord with a Major that is third of e? | SELECT "Chord" FROM table_75813 WHERE "Major third" = 'e' | SELECT "Chord" FROM "table_75813" WHERE "Major third" = 'e' | 0.057617 |
CREATE TABLE procedures (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 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)
| provide the number of patients whose death status is 0 and procedure icd9 code is 3897? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "3897" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "3897" = "procedures"."icd9_code" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "0" = "demographic"."expire_flag" | 0.210938 |
CREATE TABLE table_train_171 ("id" INT, "systolic_blood_pressure_sbp" INT, "hiv_infection" BOOLEAN, "hemoglobin_a1c_hba1c" FLOAT, "hepatitis_c" BOOLEAN, "diastolic_blood_pressure_dbp" INT, "body_mass_index_bmi" FLOAT, "triglyceride_tg" FLOAT, "NOUSE" FLOAT)
| hiv or hepatitis c positive status; | SELECT * FROM table_train_171 WHERE hiv_infection = 1 OR hepatitis_c = 1 | SELECT * FROM "table_train_171" WHERE "hepatitis_c" = 1 OR "hiv_infection" = 1 | 0.076172 |
CREATE TABLE table_name_27 (album VARCHAR, year VARCHAR)
| What is the 1990 Album? | SELECT album FROM table_name_27 WHERE year = 1990 | SELECT "album" FROM "table_name_27" WHERE "year" = 1990 | 0.053711 |
CREATE TABLE table_203_368 (id DECIMAL, "date" TEXT, "opponent" TEXT, "venue" TEXT, "result" TEXT)
| what was the total number of opponents ? | SELECT COUNT("opponent") FROM table_203_368 | SELECT COUNT("opponent") FROM "table_203_368" | 0.043945 |
CREATE TABLE table_60392 ("Rank" TEXT, "Nation" TEXT, "Gold" FLOAT, "Silver" FLOAT, "Bronze" FLOAT, "Total" FLOAT)
| When bronze is more than 3, what is the rank? | SELECT "Rank" FROM table_60392 WHERE "Bronze" > '3' | SELECT "Rank" FROM "table_60392" WHERE "Bronze" > '3' | 0.051758 |
CREATE TABLE table_24850630_4 (weight VARCHAR, venue VARCHAR)
| What was the weight of the jockey at Sandown Park? | SELECT weight FROM table_24850630_4 WHERE venue = "Sandown Park" | SELECT "weight" FROM "table_24850630_4" WHERE "Sandown Park" = "venue" | 0.068359 |
CREATE TABLE table_204_812 (id DECIMAL, "#" DECIMAL, "prime minister" TEXT, "date of birth" TEXT, "start date\ of ( first ) term" TEXT, "age at beginning\ of ( first ) term" TEXT, "end date\ of ( final ) term" TEXT, "total time in\ office" TEXT, "date of death" TEXT, "lifespan" TEXT)
| how many prime ministers were born before 1850 ? | SELECT COUNT("prime minister") FROM table_204_812 WHERE "date of birth" < 1850 | SELECT COUNT("prime minister") FROM "table_204_812" WHERE "date of birth" < 1850 | 0.078125 |
CREATE TABLE table_23533 ("Year" TEXT, "Team" TEXT, "Games" FLOAT, "Mins" TEXT, "FG%" TEXT, "3P%" TEXT, "FT%" TEXT, "Rebounds" TEXT, "Assists" TEXT, "Steals" TEXT, "Blocks" TEXT, "Points" TEXT)
| What is the game number with 385:33 mins? | SELECT MIN("Games") FROM table_23533 WHERE "Mins" = '385:33' | SELECT MIN("Games") FROM "table_23533" WHERE "Mins" = '385:33' | 0.060547 |
CREATE TABLE table_name_40 (producer_director VARCHAR, film VARCHAR)
| Who was the Producer/Director of Fear Beneath? | SELECT producer_director FROM table_name_40 WHERE film = "fear beneath" | SELECT "producer_director" FROM "table_name_40" WHERE "fear beneath" = "film" | 0.075195 |
CREATE TABLE table_name_33 (total_matches INT, total_w_l_h VARCHAR)
| Which Total matches is the lowest one that has a Total W-L-H of 1-2-0? | SELECT MIN(total_matches) FROM table_name_33 WHERE total_w_l_h = "1-2-0" | SELECT MIN("total_matches") FROM "table_name_33" WHERE "1-2-0" = "total_w_l_h" | 0.076172 |
CREATE TABLE table_80103 ("Year" FLOAT, "Entrant" TEXT, "Chassis" TEXT, "Engine" TEXT, "Points" FLOAT)
| What chassis has smaller than 9 points by Equipe Rosier? | SELECT "Chassis" FROM table_80103 WHERE "Points" < '9' AND "Entrant" = 'equipe rosier' | SELECT "Chassis" FROM "table_80103" WHERE "Entrant" = 'equipe rosier' AND "Points" < '9' | 0.085938 |
CREATE TABLE table_30677 ("Couple" TEXT, "Style" TEXT, "Music" TEXT, "Trine Dehli Cleve" FLOAT, "Tor Fl\\u00f8ysvik" FLOAT, "Karianne Gulliksen" FLOAT, "Christer Tornell" FLOAT, "Total" FLOAT)
| How many entries arr there for christer tornell for the song ' you light up my life ' whitney houston? | SELECT COUNT("Christer Tornell") FROM table_30677 WHERE "Music" = ' You Light Up My Life "— Whitney Houston' | SELECT COUNT("Christer Tornell") FROM "table_30677" WHERE "Music" = ' You Light Up My Life "— Whitney Houston' | 0.107422 |
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId 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 PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
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 FlagTypes (Id DECIMAL, Name TEXT, Description 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 ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE ReviewTaskStates (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 PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE PostTags (PostId DECIMAL, TagId 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 VoteTypes (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 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 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 PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId 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 SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
| Popular Tags by Algerian Stack Overflow Users. | SELECT TagName AS "tag", COUNT(TagName) AS "total" FROM PostTags INNER JOIN Tags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON PostTags.PostId = Posts.Id INNER JOIN Users ON Posts.OwnerUserId = Users.Id WHERE Users.Location LIKE '%Algeria%' OR Users.Location LIKE '%Algiers%' GROUP BY TagName ORDER BY TOTAL DESC | SELECT "TagName" AS "tag", COUNT("TagName") AS "total" FROM "PostTags" JOIN "Posts" ON "PostTags"."PostId" = "Posts"."Id" JOIN "Tags" ON "PostTags"."TagId" = "Tags"."Id" JOIN "Users" ON "Posts"."OwnerUserId" = "Users"."Id" AND ("Users"."Location" LIKE '%Algeria%' OR "Users"."Location" LIKE '%Algiers%') GROUP BY "TagName" ORDER BY "TOTAL" DESC NULLS LAST | 0.34668 |
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)
| count the number of patients whose ethnicity is hispanic/latino - puerto rican and procedure short title is open incis hern-grft nec? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND procedures.short_title = "Open incis hern-grft NEC" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "Open incis hern-grft NEC" = "procedures"."short_title" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "HISPANIC/LATINO - PUERTO RICAN" = "demographic"."ethnicity" | 0.258789 |
CREATE TABLE Products (Code INT, Name VARCHAR, Price DECIMAL, Manufacturer INT)
CREATE TABLE Manufacturers (Code INT, Name VARCHAR, Headquarter VARCHAR, Founder VARCHAR, Revenue FLOAT)
| For those records from the products and each product's manufacturer, give me the comparison about the sum of revenue over the name , and group by attribute name, and list by the Y-axis in ascending. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue | SELECT "T1"."Name", "T2"."Revenue" FROM "Products" AS "T1" JOIN "Manufacturers" AS "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "T1"."Name" ORDER BY "T2"."Revenue" NULLS FIRST | 0.176758 |
CREATE TABLE table_name_63 (visitor VARCHAR, decision VARCHAR, date VARCHAR)
| Which Visitor has a Decision of osgood, and a Date of february 15? | SELECT visitor FROM table_name_63 WHERE decision = "osgood" AND date = "february 15" | SELECT "visitor" FROM "table_name_63" WHERE "date" = "february 15" AND "decision" = "osgood" | 0.089844 |
CREATE TABLE table_name_28 (yacht_name VARCHAR, overall_place VARCHAR)
| What is the name of the yacht where 12 is the overall place? | SELECT yacht_name FROM table_name_28 WHERE overall_place = "12" | SELECT "yacht_name" FROM "table_name_28" WHERE "12" = "overall_place" | 0.067383 |
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
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 diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
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 treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime 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 cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
| since 2103, what were the admission times of patient 007-7925 at the hospital? | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '007-7925' AND STRFTIME('%y', patient.hospitaladmittime) >= '2103' | SELECT "patient"."hospitaladmittime" FROM "patient" WHERE "patient"."uniquepid" = '007-7925' AND STRFTIME('%y', "patient"."hospitaladmittime") >= '2103' | 0.148438 |
CREATE TABLE Dorm (dormid INT, dorm_name VARCHAR, student_capacity INT, gender VARCHAR)
CREATE TABLE Dorm_amenity (amenid INT, amenity_name VARCHAR)
CREATE TABLE Has_amenity (dormid INT, amenid INT)
CREATE TABLE Student (StuID INT, LName VARCHAR, Fname VARCHAR, Age INT, Sex VARCHAR, Major INT, Advisor INT, city_code VARCHAR)
CREATE TABLE Lives_in (stuid INT, dormid INT, room_number INT)
| What is the average age for each city and what are those cities Show bar chart, could you show bars in asc order? | SELECT city_code, AVG(Age) FROM Student GROUP BY city_code ORDER BY city_code | SELECT "city_code", AVG("Age") FROM "Student" GROUP BY "city_code" ORDER BY "city_code" NULLS FIRST | 0.09668 |
CREATE TABLE table_68854 ("City" TEXT, "Country" TEXT, "IATA" TEXT, "ICAO" TEXT, "Airport" TEXT)
| Name the ICAO for when IATA is zyl | SELECT "ICAO" FROM table_68854 WHERE "IATA" = 'zyl' | SELECT "ICAO" FROM "table_68854" WHERE "IATA" = 'zyl' | 0.051758 |
CREATE TABLE table_1569625_1 (margin_of_victory VARCHAR, tournament VARCHAR)
| Name the margin of victory when tournament is algarve open de portugal | SELECT margin_of_victory FROM table_1569625_1 WHERE tournament = "Algarve Open de Portugal" | SELECT "margin_of_victory" FROM "table_1569625_1" WHERE "Algarve Open de Portugal" = "tournament" | 0.094727 |
CREATE TABLE Products (Code INT, Name VARCHAR, Price DECIMAL, Manufacturer INT)
CREATE TABLE Manufacturers (Code INT, Name VARCHAR, Headquarter VARCHAR, Founder VARCHAR, Revenue FLOAT)
| For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and revenue , and group by attribute founder, show by the y axis in descending. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T2.Revenue DESC | SELECT "T1"."Name", "T2"."Revenue" FROM "Products" AS "T1" JOIN "Manufacturers" AS "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "Founder", "T1"."Name" ORDER BY "T2"."Revenue" DESC NULLS LAST | 0.191406 |
CREATE TABLE table_name_12 (director VARCHAR, title VARCHAR)
| Who was the director of Clean Pastures? | SELECT director FROM table_name_12 WHERE title = "clean pastures" | SELECT "director" FROM "table_name_12" WHERE "clean pastures" = "title" | 0.069336 |
CREATE TABLE table_53582 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| What was the home team when the game was at Windy Hill? | SELECT "Home team" FROM table_53582 WHERE "Venue" = 'windy hill' | SELECT "Home team" FROM "table_53582" WHERE "Venue" = 'windy hill' | 0.064453 |
CREATE TABLE table_52833 ("Year" FLOAT, "Award" TEXT, "Category" TEXT, "Nominee" TEXT, "Result" TEXT)
| When was the last time a nominee for Best Revival of a Musical was selected? | SELECT MAX("Year") FROM table_52833 WHERE "Nominee" = 'best revival of a musical' | SELECT MAX("Year") FROM "table_52833" WHERE "Nominee" = 'best revival of a musical' | 0.081055 |
CREATE TABLE table_name_20 (pick INT, college VARCHAR)
| What was the highest pick number of the player who went to LSU in college? | SELECT MAX(pick) FROM table_name_20 WHERE college = "lsu" | SELECT MAX("pick") FROM "table_name_20" WHERE "college" = "lsu" | 0.061523 |
CREATE TABLE table_49210 ("Game" FLOAT, "Date" TEXT, "Team" TEXT, "Score" TEXT, "High points" TEXT, "High rebounds" TEXT, "High assists" TEXT, "Location Attendance" TEXT, "Series" TEXT)
| What is High Rebounds, when Location Attendance is 'Madison Square Garden Unknown', and when Date is 'May 18'? | SELECT "High rebounds" FROM table_49210 WHERE "Location Attendance" = 'madison square garden unknown' AND "Date" = 'may 18' | SELECT "High rebounds" FROM "table_49210" WHERE "Date" = 'may 18' AND "Location Attendance" = 'madison square garden unknown' | 0.12207 |
CREATE TABLE table_14652 ("City" TEXT, "Province/Region" TEXT, "Country" TEXT, "IATA" TEXT, "ICAO" TEXT, "Airport" TEXT)
| Which country is the ICAO vvts? | SELECT "Country" FROM table_14652 WHERE "ICAO" = 'vvts' | SELECT "Country" FROM "table_14652" WHERE "ICAO" = 'vvts' | 0.055664 |
CREATE TABLE table_name_31 (country VARCHAR, player VARCHAR)
| What is the Country that has a Player of Scott Hoch? | SELECT country FROM table_name_31 WHERE player = "scott hoch" | SELECT "country" FROM "table_name_31" WHERE "player" = "scott hoch" | 0.06543 |
CREATE TABLE table_20938922_2 (touchdowns VARCHAR, yards VARCHAR)
| The player who had 145 yards had how many touchdowns? | SELECT COUNT(touchdowns) FROM table_20938922_2 WHERE yards = 145 | SELECT COUNT("touchdowns") FROM "table_20938922_2" WHERE "yards" = 145 | 0.068359 |
CREATE TABLE table_name_65 (cuts_made INT, events INT)
| Events smaller than 1 had what highest cuts made? | SELECT MAX(cuts_made) FROM table_name_65 WHERE events < 1 | SELECT MAX("cuts_made") FROM "table_name_65" WHERE "events" < 1 | 0.061523 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.