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_name_44 (name VARCHAR, heat VARCHAR, nationality VARCHAR)
| Who is from south korea and has a heat less than 3? | SELECT name FROM table_name_44 WHERE heat < 3 AND nationality = "south korea" | SELECT "name" FROM "table_name_44" WHERE "heat" < 3 AND "nationality" = "south korea" | 0.083008 |
CREATE TABLE tryout (pPos VARCHAR)
| Which position is most popular among players in the tryout? | SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1 | SELECT "pPos" FROM "tryout" GROUP BY "pPos" ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1 | 0.083008 |
CREATE TABLE table_75447 ("Celebrity" TEXT, "Famous for" TEXT, "Entered" TEXT, "Exited" TEXT, "Finished" TEXT)
| What position did the celebrity finish that entered on day 1 and exited on day 15? | SELECT "Finished" FROM table_75447 WHERE "Entered" = 'day 1' AND "Exited" = 'day 15' | SELECT "Finished" FROM "table_75447" WHERE "Entered" = 'day 1' AND "Exited" = 'day 15' | 0.083984 |
CREATE TABLE table_name_98 (iucn VARCHAR, est VARCHAR, reserve VARCHAR)
| What is the IUCN for the Cockscomb Basin reserve when the Est. is less than 1998? | SELECT iucn FROM table_name_98 WHERE est < 1998 AND reserve = "cockscomb basin" | SELECT "iucn" FROM "table_name_98" WHERE "cockscomb basin" = "reserve" AND "est" < 1998 | 0.084961 |
CREATE TABLE table_name_66 (country VARCHAR, rank INT)
| What is the country is ranked more than 4? | SELECT country FROM table_name_66 WHERE rank > 4 | SELECT "country" FROM "table_name_66" WHERE "rank" > 4 | 0.052734 |
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)
| what is the number of patients with angioedema primary disease who were discharged to skilled nursing facility? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "ANGIOEDEMA" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "ANGIOEDEMA" = "demographic"."diagnosis" AND "SNF" = "demographic"."discharge_location" | 0.158203 |
CREATE TABLE table_name_4 (fastest_lap VARCHAR, winning_driver VARCHAR, date VARCHAR)
| Who had the fastest lap of the race that Ayrton Senna won on 23 April? | SELECT fastest_lap FROM table_name_4 WHERE winning_driver = "ayrton senna" AND date = "23 april" | SELECT "fastest_lap" FROM "table_name_4" WHERE "23 april" = "date" AND "ayrton senna" = "winning_driver" | 0.101563 |
CREATE TABLE table_name_99 (wins INT, against VARCHAR, byes VARCHAR)
| What are the most wins with byes more than 0 and 1637 against? | SELECT MAX(wins) FROM table_name_99 WHERE against = 1637 AND byes > 0 | SELECT MAX("wins") FROM "table_name_99" WHERE "against" = 1637 AND "byes" > 0 | 0.075195 |
CREATE TABLE table_26986076_5 (tues_24_aug VARCHAR, fri_27_aug VARCHAR)
| When 20' 58.50 107.929mph is Friday August 27th What is Tuesday 24th August? | SELECT tues_24_aug FROM table_26986076_5 WHERE fri_27_aug = "20' 58.50 107.929mph" | SELECT "tues_24_aug" FROM "table_26986076_5" WHERE "20' 58.50 107.929mph" = "fri_27_aug" | 0.085938 |
CREATE TABLE table_23303 ("English Name" TEXT, "Chinese Name ( Simplified / Traditional ) " TEXT, "Pinyin" TEXT, "Population" FLOAT, "Post Code" FLOAT)
| What's the post code of the county with the Chinese name / ? | SELECT MIN("Post Code") FROM table_23303 WHERE "Chinese Name (Simplified / Traditional)" = '潜山县 / 潛山縣' | SELECT MIN("Post Code") FROM "table_23303" WHERE "Chinese Name (Simplified / Traditional)" = '潜山县 / 潛山縣' | 0.101563 |
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)
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)
| what is date of birth and gender of subject id 7273? | SELECT demographic.dob, demographic.gender FROM demographic WHERE demographic.subject_id = "7273" | SELECT "demographic"."dob", "demographic"."gender" FROM "demographic" WHERE "7273" = "demographic"."subject_id" | 0.108398 |
CREATE TABLE basketball_match (Team_ID INT, School_ID INT, Team_Name TEXT, ACC_Regular_Season TEXT, ACC_Percent TEXT, ACC_Home TEXT, ACC_Road TEXT, All_Games TEXT, All_Games_Percent INT, All_Home TEXT, All_Road TEXT, All_Neutral TEXT)
CREATE TABLE university (School_ID INT, School TEXT, Location TEXT, Founded FLOAT, Affiliation TEXT, Enrollment FLOAT, Nickname TEXT, Primary_conference TEXT)
| I want to know the proportion of sum school id for each all home. | SELECT All_Home, SUM(School_ID) FROM basketball_match GROUP BY All_Home | SELECT "All_Home", SUM("School_ID") FROM "basketball_match" GROUP BY "All_Home" | 0.077148 |
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)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| how many patients whose gender is f and insurance is medicare? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.insurance = "Medicare" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "F" = "demographic"."gender" AND "Medicare" = "demographic"."insurance" | 0.142578 |
CREATE TABLE table_53377 ("Rd #" FLOAT, "Pick #" FLOAT, "Player" TEXT, "Team ( League ) " TEXT, "Reg GP" FLOAT)
| What is the total of pick numbers with a Reg GP larger than 0? | SELECT COUNT("Pick #") FROM table_53377 WHERE "Reg GP" > '0' | SELECT COUNT("Pick #") FROM "table_53377" WHERE "Reg GP" > '0' | 0.060547 |
CREATE TABLE table_15038373_1 (license VARCHAR, version VARCHAR)
| How many licenses have version 1.2.2.0? | SELECT COUNT(license) FROM table_15038373_1 WHERE version = "1.2.2.0" | SELECT COUNT("license") FROM "table_15038373_1" WHERE "1.2.2.0" = "version" | 0.073242 |
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE 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 VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE 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 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 PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId 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 PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE 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 Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description 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 ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
| Detect posts misusing backticks for programming languages. | SELECT Id AS "post_link" FROM Posts WHERE Posts.Id > '##StartID:int?1##' AND Posts.Id < '##EndID:int?1000000##' AND (Body LIKE '%<code>PHP</code>%' OR Body LIKE '%<code>javascript</code>%' OR Body LIKE '%<code>C#</code>%' OR Body LIKE '%<code>python</code>%' OR Body LIKE '%<code>java</code>%' OR Body LIKE '%<code>C</code>%' OR Body LIKE '%<code>C++</code>%' OR Body LIKE '%<code>Android</code>%') ORDER BY Id | SELECT "Id" AS "post_link" FROM "Posts" WHERE FALSE ORDER BY "Id" NULLS FIRST | 0.075195 |
CREATE TABLE table_32230 ("Date" TEXT, "Venue" TEXT, "Score" TEXT, "Result" TEXT, "Competition" TEXT)
| Which venue had the result 7-1? | SELECT "Venue" FROM table_32230 WHERE "Result" = '7-1' | SELECT "Venue" FROM "table_32230" WHERE "Result" = '7-1' | 0.054688 |
CREATE TABLE table_65136 ("Pick" FLOAT, "Team" TEXT, "Player" TEXT, "Position" TEXT, "College" TEXT)
| Which College has a Position of Offensive Tackle? | SELECT "College" FROM table_65136 WHERE "Position" = 'offensive tackle' | SELECT "College" FROM "table_65136" WHERE "Position" = 'offensive tackle' | 0.071289 |
CREATE TABLE table_23508196_2 (tot_officers VARCHAR, tot_enlisted VARCHAR)
| How many tot officers were there on the date when the number of tot enlisted was 329640? | SELECT tot_officers FROM table_23508196_2 WHERE tot_enlisted = 329640 | SELECT "tot_officers" FROM "table_23508196_2" WHERE "tot_enlisted" = 329640 | 0.073242 |
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 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)
| how many patients are with white ethinicity and with lab test name prot.electrophoresis, urine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Prot. Electrophoresis, Urine" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "Prot. Electrophoresis, Urine" = "lab"."label" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "WHITE" = "demographic"."ethnicity" | 0.211914 |
CREATE TABLE table_dev_43 ("id" INT, "gender" TEXT, "serum_potassium" FLOAT, "systolic_blood_pressure_sbp" INT, "serum_bicarbonate" INT, "hemoglobin_a1c_hba1c" FLOAT, "point_of_care_blood_glucose_poc" INT, "diabetic" TEXT, "temperature" FLOAT, "creatinine_clearance_cl" FLOAT, "diastolic_blood_pressure_dbp" INT, "serum_sodium_concentration" INT, "heart_rate" INT, "insulin_requirement" FLOAT, "serum_creatinine" FLOAT, "electrolyte_imbalances" BOOLEAN, "fasting_glucose" INT, "age" FLOAT, "unstable_vitals_signs" BOOLEAN, "NOUSE" FLOAT)
| electrolyte imbalances ( serum bicarbonate level < 20 meq / l, serum sodium < 125 or > 150 meq / l, serum potassium < 3.5 or > 5.5 meq / l ) , serum creatinine more than 1.5 in male and 1.4 in female , creatinine clearance less than 60 ml / min, liver enzymes 3 times above upper limit of normal range. | SELECT * FROM table_dev_43 WHERE electrolyte_imbalances = 1 OR serum_bicarbonate < 20 OR (serum_sodium_concentration < 125 OR serum_sodium_concentration > 150) OR (serum_potassium < 3.5 OR serum_potassium > 5.5) OR (serum_creatinine > 1.5 AND gender = 'male') OR (serum_creatinine > 1.4 AND gender = 'female') OR creatinine_clearance_cl < 60 | SELECT * FROM "table_dev_43" WHERE "creatinine_clearance_cl" < 60 OR "electrolyte_imbalances" = 1 OR ("gender" = 'female' AND "serum_creatinine" > 1.4) OR ("gender" = 'male' AND "serum_creatinine" > 1.5) OR "serum_bicarbonate" < 20 OR "serum_potassium" < 3.5 OR "serum_potassium" > 5.5 OR "serum_sodium_concentration" < 125 OR "serum_sodium_concentration" > 150 | 0.352539 |
CREATE TABLE table_name_6 (time VARCHAR, opponent VARCHAR)
| What is shintaro ishiwatari's time? | SELECT time FROM table_name_6 WHERE opponent = "shintaro ishiwatari" | SELECT "time" FROM "table_name_6" WHERE "opponent" = "shintaro ishiwatari" | 0.072266 |
CREATE TABLE table_train_62 ("id" INT, "do_not_resuscitate_dnr" BOOLEAN, "cd4_count" INT, "oxygen_therapy_by_face_mask" BOOLEAN, "intention_to_central_venous_catheter" BOOLEAN, "blood_transfusion" BOOLEAN, "tolerate_microscan_procedure" BOOLEAN, "NOUSE" FLOAT)
| cd4 < 50 / mm3 | SELECT * FROM table_train_62 WHERE cd4_count < 50 | SELECT * FROM "table_train_62" WHERE "cd4_count" < 50 | 0.051758 |
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)
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 lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
| how many patients are with death status 0 and with diagnosis chronic diastolic heart failure? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Chronic diastolic heart failure" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "Chronic diastolic heart failure" = "diagnoses"."long_title" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "0" = "demographic"."expire_flag" | 0.235352 |
CREATE TABLE table_75911 ("Rank" FLOAT, "Name" TEXT, "Built" FLOAT, "Height" TEXT, "Floors" FLOAT)
| What is Height, when Rank is less than 20, when Floors is greater than 9, when Built is 2005, and when Name is The Edge (C)? | SELECT "Height" FROM table_75911 WHERE "Rank" < '20' AND "Floors" > '9' AND "Built" = '2005' AND "Name" = 'the edge (c)' | SELECT "Height" FROM "table_75911" WHERE "Built" = '2005' AND "Floors" > '9' AND "Name" = 'the edge (c)' AND "Rank" < '20' | 0.119141 |
CREATE TABLE table_name_2 (winning_team VARCHAR, score VARCHAR)
| who won by a score of 4-1? | SELECT winning_team FROM table_name_2 WHERE score = "4-1" | SELECT "winning_team" FROM "table_name_2" WHERE "4-1" = "score" | 0.061523 |
CREATE TABLE table_name_11 (member INT, magnitude VARCHAR, saros VARCHAR, gamma VARCHAR)
| what is the sum of the member when the saros is more than 127, gamma is less than 1.1508 and the magnitude is 0.742? | SELECT SUM(member) FROM table_name_11 WHERE saros > 127 AND gamma < 1.1508 AND magnitude = 0.742 | SELECT SUM("member") FROM "table_name_11" WHERE "gamma" < 1.1508 AND "magnitude" = 0.742 AND "saros" > 127 | 0.103516 |
CREATE TABLE table_48552 ("Round" FLOAT, "Pick" FLOAT, "Player" TEXT, "Nationality" TEXT, "College" TEXT)
| WHAT NATIONALITY HAS ROUND 3? | SELECT "Nationality" FROM table_48552 WHERE "Round" = '3' | SELECT "Nationality" FROM "table_48552" WHERE "Round" = '3' | 0.057617 |
CREATE TABLE table_37046 ("Date" TEXT, "Visitor" TEXT, "Score" TEXT, "Home" TEXT, "Record" TEXT)
| Who was the visitor on October 31? | SELECT "Visitor" FROM table_37046 WHERE "Date" = 'october 31' | SELECT "Visitor" FROM "table_37046" WHERE "Date" = 'october 31' | 0.061523 |
CREATE TABLE table_name_1 (studio_host VARCHAR, year VARCHAR, play_by_play VARCHAR, flagship_station VARCHAR)
| Play-by-play of sean grande, and a Flagship Station of wrko, and a Year of 2005-06 had what studio host? | SELECT studio_host FROM table_name_1 WHERE play_by_play = "sean grande" AND flagship_station = "wrko" AND year = "2005-06" | SELECT "studio_host" FROM "table_name_1" WHERE "2005-06" = "year" AND "flagship_station" = "wrko" AND "play_by_play" = "sean grande" | 0.128906 |
CREATE TABLE table_train_243 ("id" INT, "c_peptide_level" FLOAT, "finger_stick_measurements" BOOLEAN, "diabetic" TEXT, "fasting_blood_glucose_fbg" FLOAT, "hypoglycemia" BOOLEAN, "insulin_requirement" FLOAT, "triglyceride_tg" FLOAT, "a1c" FLOAT, "age" FLOAT, "NOUSE" FLOAT)
| safety substudy in 20 iddm patients only: insulin _ treated type ii diabetics with a c _ peptide of < 0.8 ng / mld and fasting blood glucose > 150 mg / dl will be excluded even without history of hypoglycemia during finger stick measurements. | SELECT * FROM table_train_243 WHERE insulin_requirement = 1 AND diabetic = 'ii' AND c_peptide_level < 0.8 AND fasting_blood_glucose_fbg > 150 AND (hypoglycemia = 0 AND finger_stick_measurements = 0) | SELECT * FROM "table_train_243" WHERE "c_peptide_level" < 0.8 AND "diabetic" = 'ii' AND "fasting_blood_glucose_fbg" > 150 AND "finger_stick_measurements" = 0 AND "hypoglycemia" = 0 AND "insulin_requirement" = 1 | 0.205078 |
CREATE TABLE table_57349 ("Constructor" TEXT, "Chassis" TEXT, "Engine" TEXT, "Tyres" TEXT, "Driver" TEXT, "Rounds" TEXT)
| What rounds does elio de angelis drive? | SELECT "Rounds" FROM table_57349 WHERE "Driver" = 'elio de angelis' | SELECT "Rounds" FROM "table_57349" WHERE "Driver" = 'elio de angelis' | 0.067383 |
CREATE TABLE table_1137142_1 (group_d_winner VARCHAR, group_b_winner VARCHAR)
| What was the group d winner for modena? | SELECT group_d_winner FROM table_1137142_1 WHERE group_b_winner = "Modena" | SELECT "group_d_winner" FROM "table_1137142_1" WHERE "Modena" = "group_b_winner" | 0.078125 |
CREATE TABLE table_name_28 (constructor VARCHAR, driver VARCHAR, laps VARCHAR, qual VARCHAR)
| Which constructor has Chuck Weyant as a driver, 45 laps, and a qual of less than 142.29? | SELECT constructor FROM table_name_28 WHERE laps = 45 AND qual < 142.29 AND driver = "chuck weyant" | SELECT "constructor" FROM "table_name_28" WHERE "chuck weyant" = "driver" AND "laps" = 45 AND "qual" < 142.29 | 0.106445 |
CREATE TABLE table_53658 ("Entrant" TEXT, "Constructor" TEXT, "Chassis" TEXT, "Tyre" TEXT, "Driver" TEXT, "Rounds" TEXT)
| Who was the driver with chassis 625 553 500? | SELECT "Driver" FROM table_53658 WHERE "Chassis" = '625 553 500' | SELECT "Driver" FROM "table_53658" WHERE "Chassis" = '625 553 500' | 0.064453 |
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
| what is the last time that patient 002-23819 received a prescription for lidocaine 1% pf in 04/2102? | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-23819')) AND medication.drugname = 'lidocaine 1% pf' AND STRFTIME('%y-%m', medication.drugstarttime) = '2102-04' ORDER BY medication.drugstarttime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '002-23819' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "medication"."drugstarttime" FROM "medication" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "medication"."patientunitstayid" WHERE "medication"."drugname" = 'lidocaine 1% pf' AND NOT "_u_1"."" IS NULL AND STRFTIME('%y-%m', "medication"."drugstarttime") = '2102-04' ORDER BY "medication"."drugstarttime" DESC NULLS LAST LIMIT 1 | 0.671875 |
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 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 patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod 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 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 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 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 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 transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
| what are the four most common lab tests among the patients aged 20s in 2103? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) AND STRFTIME('%y', labevents.charttime) = '2103' GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 4) | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."age" <= 29 AND "admissions"."age" >= 20 GROUP BY "hadm_id"), "t1" AS (SELECT "labevents"."itemid", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC NULLS LAST) AS "c1" FROM "labevents" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "labevents"."hadm_id" WHERE NOT "_u_0"."" IS NULL AND STRFTIME('%y', "labevents"."charttime") = '2103' GROUP BY "labevents"."itemid"), "_u_1" AS (SELECT "t1"."itemid" FROM "t1" AS "t1" WHERE "t1"."c1" <= 4 GROUP BY "itemid") SELECT "d_labitems"."label" FROM "d_labitems" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "d_labitems"."itemid" WHERE NOT "_u_1"."" IS NULL | 0.650391 |
CREATE TABLE table_18604 ("District" TEXT, "Incumbent" TEXT, "Party" TEXT, "First elected" FLOAT, "Result" TEXT, "Candidates" TEXT)
| Who are the contenders In the New York 29 polling area race? | SELECT "Candidates" FROM table_18604 WHERE "District" = 'New York 29' | SELECT "Candidates" FROM "table_18604" WHERE "District" = 'New York 29' | 0.069336 |
CREATE TABLE table_46153 ("Game" TEXT, "Date" TEXT, "Opponent" TEXT, "Score" TEXT, "Location/Attendance" TEXT, "Record" TEXT)
| Who was the opponent in Game 44? | SELECT "Opponent" FROM table_46153 WHERE "Game" = '44' | SELECT "Opponent" FROM "table_46153" WHERE "Game" = '44' | 0.054688 |
CREATE TABLE table_46373 ("Game" FLOAT, "Date" TEXT, "Opponent" TEXT, "Result" TEXT, "Score" TEXT, "Record" TEXT, "Streak" TEXT, "Attendance" FLOAT)
| Which Date has a Score of 24-7, and a Record of 4-10? | SELECT "Date" FROM table_46373 WHERE "Score" = '24-7' AND "Record" = '4-10' | SELECT "Date" FROM "table_46373" WHERE "Record" = '4-10' AND "Score" = '24-7' | 0.075195 |
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId 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 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 FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId 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 Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress 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 CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
| users with my same first name who have twitter in their about me. | SELECT COUNT(*) FROM Users WHERE DisplayName LIKE 'Abby %' AND WebsiteUrl LIKE '%twitter%' | SELECT COUNT(*) FROM "Users" WHERE "DisplayName" LIKE 'Abby %' AND "WebsiteUrl" LIKE '%twitter%' | 0.09375 |
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE 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 vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
| when did patient 004-93782 for the last time since 2102 get discharged from the hospital? | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '004-93782' AND STRFTIME('%y', patient.hospitaldischargetime) >= '2102' ORDER BY patient.hospitaldischargetime DESC LIMIT 1 | SELECT "patient"."hospitaldischargetime" FROM "patient" WHERE "patient"."uniquepid" = '004-93782' AND STRFTIME('%y', "patient"."hospitaldischargetime") >= '2102' ORDER BY "patient"."hospitaldischargetime" DESC NULLS LAST LIMIT 1 | 0.222656 |
CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DECIMAL)
CREATE TABLE departments (DEPARTMENT_ID DECIMAL, DEPARTMENT_NAME VARCHAR, MANAGER_ID DECIMAL, LOCATION_ID DECIMAL)
CREATE TABLE jobs (JOB_ID VARCHAR, JOB_TITLE VARCHAR, MIN_SALARY DECIMAL, MAX_SALARY DECIMAL)
CREATE TABLE job_history (EMPLOYEE_ID DECIMAL, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR, DEPARTMENT_ID DECIMAL)
CREATE TABLE employees (EMPLOYEE_ID DECIMAL, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR, SALARY DECIMAL, COMMISSION_PCT DECIMAL, MANAGER_ID DECIMAL, DEPARTMENT_ID DECIMAL)
CREATE TABLE regions (REGION_ID DECIMAL, REGION_NAME VARCHAR)
CREATE TABLE locations (LOCATION_ID DECIMAL, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR, COUNTRY_ID VARCHAR)
| For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the average of department_id bin hire_date by weekday in a bar chart. | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | SELECT "HIRE_DATE", AVG("DEPARTMENT_ID") FROM "employees" WHERE "HIRE_DATE" < '2002-06-21' | 0.087891 |
CREATE TABLE table_203_564 (id DECIMAL, "hand" TEXT, "1 credit" DECIMAL, "2 credits" DECIMAL, "3 credits" DECIMAL, "4 credits" DECIMAL, "5 credits" DECIMAL)
| is a 2 credit full house the same as a 5 credit three of a kind ? | SELECT (SELECT "2 credits" FROM table_203_564 WHERE "hand" = 'full house') = (SELECT "5 credits" FROM table_203_564 WHERE "hand" = 'three of a kind') | SELECT (SELECT "2 credits" FROM "table_203_564" WHERE "hand" = 'full house') = (SELECT "5 credits" FROM "table_203_564" WHERE "hand" = 'three of a kind') | 0.149414 |
CREATE TABLE table_26144632_1 (location VARCHAR, dates VARCHAR)
| What is the location for tournament on Jul 8-11? | SELECT location FROM table_26144632_1 WHERE dates = "Jul 8-11" | SELECT "location" FROM "table_26144632_1" WHERE "Jul 8-11" = "dates" | 0.066406 |
CREATE TABLE table_name_2 (_m__best_ VARCHAR, _fairest VARCHAR, president VARCHAR, _m__coach VARCHAR)
| Who was the (M) Best & Fairest when ray kaduck was president and richard keane was coach? | SELECT _m__best_ & _fairest FROM table_name_2 WHERE president = "ray kaduck" AND _m__coach = "richard keane" | SELECT "_m__best_" & "_fairest" FROM "table_name_2" WHERE "_m__coach" = "richard keane" AND "president" = "ray kaduck" | 0.115234 |
CREATE TABLE table_name_37 (date VARCHAR, catalogue__number VARCHAR)
| What is the date with the catalogue # cocy-80093? | SELECT date FROM table_name_37 WHERE catalogue__number = "cocy-80093" | SELECT "date" FROM "table_name_37" WHERE "catalogue__number" = "cocy-80093" | 0.073242 |
CREATE TABLE table_63967 ("Date" TEXT, "Round" TEXT, "Opponents" TEXT, "H / A" TEXT, "Result F \\u2013 A" TEXT)
| What Round has h/a hurst | SELECT "Round" FROM table_63967 WHERE "H / A" = 'hurst' | SELECT "Round" FROM "table_63967" WHERE "H / A" = 'hurst' | 0.055664 |
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, visualize a bar chart about the distribution of founder and the sum of price , and group by attribute founder, sort x-axis from high to low order. | SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | SELECT "Founder", SUM("Price") FROM "Products" AS "T1" JOIN "Manufacturers" AS "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "Founder" ORDER BY "Founder" DESC NULLS LAST | 0.169922 |
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 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 allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE 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 lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
| count the number of patients who have been dead after having been diagnosed with intracranial injury - with subdural hematoma in the same hospital visit until 2 years ago. | SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'intracranial injury - with subdural hematoma') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1.diagnosistime) = t1.diagnosistime AND DATETIME(t1.diagnosistime) <= DATETIME(CURRENT_TIME(), '-2 year')) AS t2 JOIN (SELECT patient.uniquepid, patient.patienthealthsystemstayid, patient.hospitaldischargetime FROM patient WHERE patient.hospitaldischargestatus = 'expired') AS t3 ON t2.uniquepid = t3.uniquepid WHERE t2.patienthealthsystemstayid = t3.patienthealthsystemstayid | WITH "t2" AS (SELECT "patient"."uniquepid", "patient"."patienthealthsystemstayid" FROM "diagnosis" JOIN "patient" ON "diagnosis"."patientunitstayid" = "patient"."patientunitstayid" WHERE "diagnosis"."diagnosisname" = 'intracranial injury - with subdural hematoma' GROUP BY "patient"."uniquepid" HAVING "diagnosis"."diagnosistime" = MIN("diagnosis"."diagnosistime") AND DATETIME("diagnosis"."diagnosistime") <= DATETIME(CURRENT_TIME(), '-2 year')) SELECT COUNT(DISTINCT "t2"."uniquepid") FROM "t2" AS "t2" JOIN "patient" ON "patient"."hospitaldischargestatus" = 'expired' AND "patient"."patienthealthsystemstayid" = "t2"."patienthealthsystemstayid" AND "patient"."uniquepid" = "t2"."uniquepid" | 0.675781 |
CREATE TABLE table_29029 ("Season" FLOAT, "Series" TEXT, "Team Name" TEXT, "Races" FLOAT, "Poles" FLOAT, "Wins" FLOAT, "Podiums" FLOAT, "F/Laps" FLOAT, "Points" TEXT, "Final Placing" TEXT)
| When there were 30 races and the final placing was 13th, how many points were scored? | SELECT "Points" FROM table_29029 WHERE "Final Placing" = '13th' AND "Races" = '30' | SELECT "Points" FROM "table_29029" WHERE "Final Placing" = '13th' AND "Races" = '30' | 0.082031 |
CREATE TABLE table_name_11 (to_par VARCHAR, score VARCHAR)
| What is the to par for the score 72-69-68=209? | SELECT to_par FROM table_name_11 WHERE score = 72 - 69 - 68 = 209 | SELECT "to_par" FROM "table_name_11" WHERE "score" = FALSE | 0.056641 |
CREATE TABLE body_builder (Body_Builder_ID INT, People_ID INT, Snatch FLOAT, Clean_Jerk FLOAT, Total FLOAT)
CREATE TABLE people (People_ID INT, Name TEXT, Height FLOAT, Weight FLOAT, Birth_Date TEXT, Birth_Place TEXT)
| A scatter chart shows the correlation between People_ID and Total . | SELECT People_ID, Total FROM body_builder | SELECT "People_ID", "Total" FROM "body_builder" | 0.045898 |
CREATE TABLE routes (rid DECIMAL, dst_apid DECIMAL, dst_ap TEXT, src_apid DECIMAL, src_ap TEXT, alid DECIMAL, airline TEXT, codeshare TEXT)
CREATE TABLE airlines (alid DECIMAL, name TEXT, iata TEXT, icao TEXT, callsign TEXT, country TEXT, active TEXT)
CREATE TABLE airports (apid DECIMAL, name TEXT, city TEXT, country TEXT, x DECIMAL, y DECIMAL, elevation DECIMAL, iata TEXT, icao TEXT)
| Find the busiest source airport that runs most number of routes in China. | SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 | SELECT "T1"."name" FROM "airports" AS "T1" JOIN "routes" AS "T2" ON "T1"."apid" = "T2"."src_apid" WHERE "T1"."country" = 'China' GROUP BY "T1"."name" ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1 | 0.186523 |
CREATE TABLE table_name_30 (region VARCHAR, format VARCHAR, date VARCHAR)
| Name the region for cd format on february 22, 1984 | SELECT region FROM table_name_30 WHERE format = "cd" AND date = "february 22, 1984" | SELECT "region" FROM "table_name_30" WHERE "cd" = "format" AND "date" = "february 22, 1984" | 0.088867 |
CREATE TABLE table_name_59 (country VARCHAR, player VARCHAR)
| What country is Craig Parry from? | SELECT country FROM table_name_59 WHERE player = "craig parry" | SELECT "country" FROM "table_name_59" WHERE "craig parry" = "player" | 0.066406 |
CREATE TABLE table_1816947_2 (highest_attendance_away VARCHAR, average_attendance_home VARCHAR)
| When the home attendance is 3.123, what's the highest away attendance? | SELECT highest_attendance_away FROM table_1816947_2 WHERE average_attendance_home = "3.123" | SELECT "highest_attendance_away" FROM "table_1816947_2" WHERE "3.123" = "average_attendance_home" | 0.094727 |
CREATE TABLE airports (apid DECIMAL, name TEXT, city TEXT, country TEXT, x DECIMAL, y DECIMAL, elevation DECIMAL, iata TEXT, icao TEXT)
CREATE TABLE airlines (alid DECIMAL, name TEXT, iata TEXT, icao TEXT, callsign TEXT, country TEXT, active TEXT)
CREATE TABLE routes (rid DECIMAL, dst_apid DECIMAL, dst_ap TEXT, src_apid DECIMAL, src_ap TEXT, alid DECIMAL, airline TEXT, codeshare TEXT)
| What is the name, city, and country of the airport with the highest elevation? | SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1 | SELECT "name", "city", "country" FROM "airports" ORDER BY "elevation" DESC NULLS LAST LIMIT 1 | 0.09082 |
CREATE TABLE table_name_57 (population INT, rank_among_provinces INT)
| What is the highest population for the province having a rank under 5? | SELECT MAX(population) FROM table_name_57 WHERE rank_among_provinces < 5 | SELECT MAX("population") FROM "table_name_57" WHERE "rank_among_provinces" < 5 | 0.076172 |
CREATE TABLE table_name_75 (team VARCHAR, date VARCHAR)
| What is Team, when Date is 'March 27'? | SELECT team FROM table_name_75 WHERE date = "march 27" | SELECT "team" FROM "table_name_75" WHERE "date" = "march 27" | 0.058594 |
CREATE TABLE table_18694 ("District" TEXT, "Incumbent" TEXT, "Party" TEXT, "First elected" FLOAT, "Result" TEXT, "Candidates" TEXT)
| Who were the candidates in the election in the Tennessee 9 district? | SELECT "Candidates" FROM table_18694 WHERE "District" = 'Tennessee 9' | SELECT "Candidates" FROM "table_18694" WHERE "District" = 'Tennessee 9' | 0.069336 |
CREATE TABLE table_name_9 (game VARCHAR, result VARCHAR)
| What Game had a Result of 136-112? | SELECT game FROM table_name_9 WHERE result = "136-112" | SELECT "game" FROM "table_name_9" WHERE "136-112" = "result" | 0.058594 |
CREATE TABLE table_47414 ("Outcome" TEXT, "Year" FLOAT, "Tournament" TEXT, "Surface" TEXT, "Partner" TEXT, "Opponents" TEXT, "Score" TEXT)
| What is the Surface of the court in the match with a Score of 4 6, 6 4, 3 6? | SELECT "Surface" FROM table_47414 WHERE "Score" = '4–6, 6–4, 3–6' | SELECT "Surface" FROM "table_47414" WHERE "Score" = '4–6, 6–4, 3–6' | 0.06543 |
CREATE TABLE table_28601467_1 (final_venue VARCHAR, winner VARCHAR, host_nation_s_ VARCHAR, runner_up VARCHAR)
| What was the final venue whene England hasted the competition and the runner-up record is [[|]] 4 points and the winner record is [[|]] 6 points? | SELECT final_venue FROM table_28601467_1 WHERE host_nation_s_ = "England" AND runner_up = "[[|]] 4 points" AND winner = "[[|]] 6 points" | SELECT "final_venue" FROM "table_28601467_1" WHERE "England" = "host_nation_s_" AND "[[|]] 4 points" = "runner_up" AND "[[|]] 6 points" = "winner" | 0.142578 |
CREATE TABLE table_train_79 ("id" INT, "fasting_triglycerides" INT, "fasting_total_cholesterol" INT, "fasting_glucose" INT, "age" FLOAT, "NOUSE" FLOAT)
| laboratory findings of fasting triglycerides greater than or equal to 200 mg / dl | SELECT * FROM table_train_79 WHERE fasting_triglycerides >= 200 | SELECT * FROM "table_train_79" WHERE "fasting_triglycerides" >= 200 | 0.06543 |
CREATE TABLE table_name_21 (home_team VARCHAR, venue VARCHAR)
| What is the home team of Lake Oval? | SELECT home_team FROM table_name_21 WHERE venue = "lake oval" | SELECT "home_team" FROM "table_name_21" WHERE "lake oval" = "venue" | 0.06543 |
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE course_tags_count (course_id INT, clear_grading INT, pop_quiz INT, group_projects INT, inspirational INT, long_lectures INT, extra_credit INT, few_tests INT, good_feedback INT, tough_tests INT, heavy_papers INT, cares_for_students INT, heavy_assignments INT, respected INT, participation INT, heavy_reading INT, tough_grader INT, hilarious INT, would_take_again INT, good_lecture INT, no_skip INT)
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE student_record (student_id INT, course_id INT, semester INT, grade VARCHAR, how VARCHAR, transfer_source VARCHAR, earn_credit VARCHAR, repeat_term VARCHAR, test_id VARCHAR)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
| Are there any 500 -level classes offered in the Spring or Summer term ? | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 500 AND 500 + 100 AND semester.semester IN ('SP', 'SU', 'SS') AND semester.semester_id = course_offering.semester AND semester.year = 2016 | SELECT DISTINCT "course"."department", "course"."name", "course"."number", "semester"."semester" FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" IN ('SP', 'SU', 'SS') AND "semester"."year" = 2016 WHERE "course"."department" = 'department0' AND "course"."number" <= 600 AND "course"."number" >= 500 | 0.432617 |
CREATE TABLE Manufacturers (Code INT, Name VARCHAR, Headquarter VARCHAR, Founder VARCHAR, Revenue FLOAT)
CREATE TABLE Products (Code INT, Name VARCHAR, Price DECIMAL, Manufacturer INT)
| Visualize a bar chart for what are the names and the total prices of all products in the store?, order y-axis in desc order. | SELECT Name, SUM(Price) FROM Products GROUP BY Name ORDER BY SUM(Price) DESC | SELECT "Name", SUM("Price") FROM "Products" GROUP BY "Name" ORDER BY SUM("Price") DESC NULLS LAST | 0.094727 |
CREATE TABLE table_name_50 (director VARCHAR, year VARCHAR)
| Name the director for 1957 | SELECT director FROM table_name_50 WHERE year = 1957 | SELECT "director" FROM "table_name_50" WHERE "year" = 1957 | 0.056641 |
CREATE TABLE table_26267849_11 (percentage_of_votes VARCHAR, finished VARCHAR)
| Name the percentage of votes for 3rd finished | SELECT percentage_of_votes FROM table_26267849_11 WHERE finished = "3rd" | SELECT "percentage_of_votes" FROM "table_26267849_11" WHERE "3rd" = "finished" | 0.076172 |
CREATE TABLE table_1691800_2 (population__2010_ VARCHAR, municipality VARCHAR)
| what is the population where municipality is san jacinto? | SELECT population__2010_ FROM table_1691800_2 WHERE municipality = "San Jacinto" | SELECT "population__2010_" FROM "table_1691800_2" WHERE "San Jacinto" = "municipality" | 0.083984 |
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE procedures_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 inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
| find out the number of patients admitted to the hospital in 2103. | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE STRFTIME('%y', admissions.admittime) = '2103' | SELECT COUNT(DISTINCT "admissions"."subject_id") FROM "admissions" WHERE STRFTIME('%y', "admissions"."admittime") = '2103' | 0.119141 |
CREATE TABLE ENROLL (CLASS_CODE VARCHAR, STU_NUM INT, ENROLL_GRADE VARCHAR)
CREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR, DEPT_NAME VARCHAR, SCHOOL_CODE VARCHAR, EMP_NUM INT, DEPT_ADDRESS VARCHAR, DEPT_EXTENSION VARCHAR)
CREATE TABLE EMPLOYEE (EMP_NUM INT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR, EMP_JOBCODE VARCHAR, EMP_HIREDATE DATETIME, EMP_DOB DATETIME)
CREATE TABLE COURSE (CRS_CODE VARCHAR, DEPT_CODE VARCHAR, CRS_DESCRIPTION VARCHAR, CRS_CREDIT FLOAT)
CREATE TABLE CLASS (CLASS_CODE VARCHAR, CRS_CODE VARCHAR, CLASS_SECTION VARCHAR, CLASS_TIME VARCHAR, CLASS_ROOM VARCHAR, PROF_NUM INT)
CREATE TABLE STUDENT (STU_NUM INT, STU_LNAME VARCHAR, STU_FNAME VARCHAR, STU_INIT VARCHAR, STU_DOB DATETIME, STU_HRS INT, STU_CLASS VARCHAR, STU_GPA FLOAT, STU_TRANSFER DECIMAL, DEPT_CODE VARCHAR, STU_PHONE VARCHAR, PROF_NUM INT)
CREATE TABLE PROFESSOR (EMP_NUM INT, DEPT_CODE VARCHAR, PROF_OFFICE VARCHAR, PROF_EXTENSION VARCHAR, PROF_HIGH_DEGREE VARCHAR)
| How many courses each teacher taught? Show me a bar chart grouping by instructor's first name, and list X from high to low order. | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY EMP_FNAME ORDER BY EMP_FNAME DESC | SELECT "EMP_FNAME", COUNT("EMP_FNAME") FROM "CLASS" AS "T1" JOIN "EMPLOYEE" AS "T2" ON "T1"."PROF_NUM" = "T2"."EMP_NUM" GROUP BY "EMP_FNAME" ORDER BY "EMP_FNAME" DESC NULLS LAST | 0.172852 |
CREATE TABLE table_name_12 (attendance INT, week VARCHAR, date VARCHAR)
| With the date of October 28, 1962, and the week greater than 4, what was the lowest attendance? | SELECT MIN(attendance) FROM table_name_12 WHERE week > 4 AND date = "october 28, 1962" | SELECT MIN("attendance") FROM "table_name_12" WHERE "date" = "october 28, 1962" AND "week" > 4 | 0.091797 |
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 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)
| provide the number of patients whose death status is 1 and drug name is citalopram hydrobromide? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Citalopram Hydrobromide" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "Citalopram Hydrobromide" = "prescriptions"."drug" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "1" = "demographic"."expire_flag" | 0.233398 |
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 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)
| give the number of patients who passed away in or before the year 2180. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dod_year <= "2180.0" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "2180.0" >= "demographic"."dod_year" | 0.108398 |
CREATE TABLE table_name_14 (opponent VARCHAR, date VARCHAR)
| Which opponent has September 14, 2003 as the date? | SELECT opponent FROM table_name_14 WHERE date = "september 14, 2003" | SELECT "opponent" FROM "table_name_14" WHERE "date" = "september 14, 2003" | 0.072266 |
CREATE TABLE table_56652 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| What did the home team score when South Melbourne was the away team? | SELECT "Home team score" FROM table_56652 WHERE "Away team" = 'south melbourne' | SELECT "Home team score" FROM "table_56652" WHERE "Away team" = 'south melbourne' | 0.079102 |
CREATE TABLE Products_for_Hire (product_id INT, product_type_code VARCHAR, daily_hire_cost DECIMAL, product_name VARCHAR, product_description VARCHAR)
CREATE TABLE Discount_Coupons (coupon_id INT, date_issued DATETIME, coupon_amount DECIMAL)
CREATE TABLE Customers (customer_id INT, coupon_id INT, good_or_bad_customer VARCHAR, first_name VARCHAR, last_name VARCHAR, gender_mf VARCHAR, date_became_customer DATETIME, date_last_hire DATETIME)
CREATE TABLE View_Product_Availability (product_id INT, booking_id INT, status_date DATETIME, available_yn VARCHAR)
CREATE TABLE Bookings (booking_id INT, customer_id INT, booking_status_code VARCHAR, returned_damaged_yn VARCHAR, booking_start_date DATETIME, booking_end_date DATETIME, count_hired VARCHAR, amount_payable DECIMAL, amount_of_discount DECIMAL, amount_outstanding DECIMAL, amount_of_refund DECIMAL)
CREATE TABLE Payments (payment_id INT, booking_id INT, customer_id INT, payment_type_code VARCHAR, amount_paid_in_full_yn VARCHAR, payment_date DATETIME, amount_due DECIMAL, amount_paid DECIMAL)
CREATE TABLE Products_Booked (booking_id INT, product_id INT, returned_yn VARCHAR, returned_late_yn VARCHAR, booked_count INT, booked_amount FLOAT)
| Take the first name of all the good customers as the X-axis and gender of all the good customers as Y-axis in a bar chart, and sort by the names in asc. | SELECT first_name, gender_mf FROM Customers WHERE good_or_bad_customer = 'good' ORDER BY first_name | SELECT "first_name", "gender_mf" FROM "Customers" WHERE "good_or_bad_customer" = 'good' ORDER BY "first_name" NULLS FIRST | 0.118164 |
CREATE TABLE job_history (EMPLOYEE_ID DECIMAL, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR, DEPARTMENT_ID DECIMAL)
CREATE TABLE jobs (JOB_ID VARCHAR, JOB_TITLE VARCHAR, MIN_SALARY DECIMAL, MAX_SALARY DECIMAL)
CREATE TABLE locations (LOCATION_ID DECIMAL, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR, COUNTRY_ID VARCHAR)
CREATE TABLE departments (DEPARTMENT_ID DECIMAL, DEPARTMENT_NAME VARCHAR, MANAGER_ID DECIMAL, LOCATION_ID DECIMAL)
CREATE TABLE employees (EMPLOYEE_ID DECIMAL, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR, SALARY DECIMAL, COMMISSION_PCT DECIMAL, MANAGER_ID DECIMAL, DEPARTMENT_ID DECIMAL)
CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DECIMAL)
CREATE TABLE regions (REGION_ID DECIMAL, REGION_NAME VARCHAR)
| For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, return a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id. | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID | SELECT "JOB_ID", COUNT("JOB_ID") FROM "employees" WHERE ("COMMISSION_PCT" <> "null" OR "DEPARTMENT_ID" <> 40) AND ("DEPARTMENT_ID" <> 40 OR "SALARY" <= 12000) AND ("DEPARTMENT_ID" <> 40 OR "SALARY" >= 8000) GROUP BY "JOB_ID" | 0.21875 |
CREATE TABLE table_name_52 (city VARCHAR, lead VARCHAR)
| Which City has a Lead of steve gould? | SELECT city FROM table_name_52 WHERE lead = "steve gould" | SELECT "city" FROM "table_name_52" WHERE "lead" = "steve gould" | 0.061523 |
CREATE TABLE table_name_79 (round INT, overall VARCHAR, position VARCHAR, college VARCHAR)
| What is the average round of the s position player from the college of Mississippi and has an overall less than 214? | SELECT AVG(round) FROM table_name_79 WHERE position = "s" AND college = "mississippi" AND overall < 214 | SELECT AVG("round") FROM "table_name_79" WHERE "college" = "mississippi" AND "overall" < 214 AND "position" = "s" | 0.110352 |
CREATE TABLE table_204_862 (id DECIMAL, "rank" DECIMAL, "bib" DECIMAL, "athlete" TEXT, "country" TEXT, "run 1" TEXT, "run 2" TEXT, "total" TEXT, "behind" DECIMAL)
| who finished at the top with a gold medal ? | SELECT "athlete" FROM table_204_862 WHERE id = 1 | SELECT "athlete" FROM "table_204_862" WHERE "id" = 1 | 0.050781 |
CREATE TABLE member_of_club (stuid DECIMAL, clubid DECIMAL, position TEXT)
CREATE TABLE student (stuid DECIMAL, lname TEXT, fname TEXT, age DECIMAL, sex TEXT, major DECIMAL, advisor DECIMAL, city_code TEXT)
CREATE TABLE club (clubid DECIMAL, clubname TEXT, clubdesc TEXT, clublocation TEXT)
| Find the names of all the clubs that have at least a member from the city with city code 'BAL'. | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "BAL" | SELECT DISTINCT "t1"."clubname" FROM "club" AS "t1" JOIN "member_of_club" AS "t2" ON "t1"."clubid" = "t2"."clubid" JOIN "student" AS "t3" ON "BAL" = "t3"."city_code" AND "t2"."stuid" = "t3"."stuid" | 0.192383 |
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)
| what is religion of subject id 6983? | SELECT demographic.religion FROM demographic WHERE demographic.subject_id = "6983" | SELECT "demographic"."religion" FROM "demographic" WHERE "6983" = "demographic"."subject_id" | 0.089844 |
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)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| find out the time of admission and days for which patient with patient id 66411 stayed in hospital. | SELECT demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "66411" | SELECT "demographic"."days_stay", "demographic"."admittime" FROM "demographic" WHERE "66411" = "demographic"."subject_id" | 0.118164 |
CREATE TABLE table_name_64 (wins INT, against VARCHAR, draws VARCHAR)
| How many wins for team with 1800 Against and more than 0 byes? | SELECT MAX(wins) FROM table_name_64 WHERE against = 1800 AND draws > 0 | SELECT MAX("wins") FROM "table_name_64" WHERE "against" = 1800 AND "draws" > 0 | 0.076172 |
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 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 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 treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime 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 intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
| the first time since 06/2105, when was patient 007-4322 prescribed insulin lispro 100 units/ml subq soln and insulin aspart at the same time? | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'insulin lispro 100 units/ml subq soln' AND patient.uniquepid = '007-4322' AND STRFTIME('%y-%m', medication.drugstarttime) >= '2105-06') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'insulin aspart' AND patient.uniquepid = '007-4322' AND STRFTIME('%y-%m', medication.drugstarttime) >= '2105-06') AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) ORDER BY t1.drugstarttime LIMIT 1 | WITH "t2" AS (SELECT "patient"."uniquepid", "medication"."drugstarttime" FROM "medication" JOIN "patient" ON "medication"."patientunitstayid" = "patient"."patientunitstayid" AND "patient"."uniquepid" = '007-4322' WHERE "medication"."drugname" = 'insulin aspart' AND STRFTIME('%y-%m', "medication"."drugstarttime") >= '2105-06') SELECT "medication"."drugstarttime" FROM "medication" JOIN "patient" ON "medication"."patientunitstayid" = "patient"."patientunitstayid" AND "patient"."uniquepid" = '007-4322' JOIN "t2" AS "t2" ON "patient"."uniquepid" = "t2"."uniquepid" AND DATETIME("medication"."drugstarttime") = DATETIME("t2"."drugstarttime") WHERE "medication"."drugname" = 'insulin lispro 100 units/ml subq soln' AND STRFTIME('%y-%m', "medication"."drugstarttime") >= '2105-06' ORDER BY "medication"."drugstarttime" NULLS FIRST LIMIT 1 | 0.816406 |
CREATE TABLE table_72573 ("Week" FLOAT, "Date" TEXT, "Opponent" TEXT, "Result" TEXT, "Game site" TEXT, "Record" TEXT, "Attendance" FLOAT)
| What are week 4 results? | SELECT "Result" FROM table_72573 WHERE "Week" = '4' | SELECT "Result" FROM "table_72573" WHERE "Week" = '4' | 0.051758 |
CREATE TABLE table_22050 ("Week" FLOAT, "Date" TEXT, "Opponent" TEXT, "Result" TEXT, "Game site" TEXT, "Record" TEXT, "Attendance" FLOAT)
| What is the opponent played on October 4? | SELECT "Opponent" FROM table_22050 WHERE "Date" = 'October 4' | SELECT "Opponent" FROM "table_22050" WHERE "Date" = 'October 4' | 0.061523 |
CREATE TABLE table_20549 ("Season" TEXT, "1st Place" TEXT, "2nd Place" TEXT, "3rd Place" TEXT, "4th Place" TEXT)
| What team finished in 1st when tau cer mica was in 3rd? | SELECT "1st Place" FROM table_20549 WHERE "3rd Place" = 'TAU Cerámica' | SELECT "1st Place" FROM "table_20549" WHERE "3rd Place" = 'TAU Cerámica' | 0.070313 |
CREATE TABLE table_name_68 (away_team VARCHAR, venue VARCHAR)
| Who was the away team at Lake Oval? | SELECT away_team AS score FROM table_name_68 WHERE venue = "lake oval" | SELECT "away_team" AS "score" FROM "table_name_68" WHERE "lake oval" = "venue" | 0.076172 |
CREATE TABLE table_name_13 (team VARCHAR, position VARCHAR, against VARCHAR, lost VARCHAR)
| What team has an against more than 8, lost of 7, and the position is 5? | SELECT team FROM table_name_13 WHERE against > 8 AND lost = 7 AND position = 5 | SELECT "team" FROM "table_name_13" WHERE "against" > 8 AND "lost" = 7 AND "position" = 5 | 0.085938 |
CREATE TABLE table_name_55 (mississippi_st VARCHAR, alabama VARCHAR)
| Who was the Mississippi State player associated with Cornelius Bennett? | SELECT mississippi_st FROM table_name_55 WHERE alabama = "cornelius bennett" | SELECT "mississippi_st" FROM "table_name_55" WHERE "alabama" = "cornelius bennett" | 0.080078 |
CREATE TABLE departments (DEPARTMENT_ID DECIMAL, DEPARTMENT_NAME VARCHAR, MANAGER_ID DECIMAL, LOCATION_ID DECIMAL)
CREATE TABLE jobs (JOB_ID VARCHAR, JOB_TITLE VARCHAR, MIN_SALARY DECIMAL, MAX_SALARY DECIMAL)
CREATE TABLE job_history (EMPLOYEE_ID DECIMAL, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR, DEPARTMENT_ID DECIMAL)
CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DECIMAL)
CREATE TABLE locations (LOCATION_ID DECIMAL, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR, COUNTRY_ID VARCHAR)
CREATE TABLE employees (EMPLOYEE_ID DECIMAL, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR, SALARY DECIMAL, COMMISSION_PCT DECIMAL, MANAGER_ID DECIMAL, DEPARTMENT_ID DECIMAL)
CREATE TABLE regions (REGION_ID DECIMAL, REGION_NAME VARCHAR)
| For those employees who was hired before 2002-06-21, draw a line chart about the change of salary over hire_date , and show from high to low by the HIRE_DATE. | SELECT HIRE_DATE, SALARY FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE DESC | SELECT "HIRE_DATE", "SALARY" FROM "employees" WHERE "HIRE_DATE" < '2002-06-21' ORDER BY "HIRE_DATE" DESC NULLS LAST | 0.112305 |
CREATE TABLE table_53026 ("Name" TEXT, "Real Name" TEXT, "Birthdate" TEXT, "Costume Role" TEXT, "Defining characteristics" TEXT)
| What is the defining characteristic of Takeshi Kuroiwa? | SELECT "Defining characteristics" FROM table_53026 WHERE "Real Name" = 'takeshi kuroiwa' | SELECT "Defining characteristics" FROM "table_53026" WHERE "Real Name" = 'takeshi kuroiwa' | 0.087891 |
CREATE TABLE table_79079 ("Opposing Teams" TEXT, "Against" FLOAT, "Date" TEXT, "Venue" TEXT, "Status" TEXT)
| What is Opposing Teams, when Date is '11/10/1991'? | SELECT "Opposing Teams" FROM table_79079 WHERE "Date" = '11/10/1991' | SELECT "Opposing Teams" FROM "table_79079" WHERE "Date" = '11/10/1991' | 0.068359 |
CREATE TABLE table_name_37 (wins INT, poles VARCHAR, season VARCHAR, podiums VARCHAR)
| What is the lowest Wins, when Season is 2011, when Podiums is 1, and when Poles is less than 0? | SELECT MIN(wins) FROM table_name_37 WHERE season = "2011" AND podiums = 1 AND poles < 0 | SELECT MIN("wins") FROM "table_name_37" WHERE "2011" = "season" AND "podiums" = 1 AND "poles" < 0 | 0.094727 |
CREATE TABLE table_75273 ("Date" TEXT, "Tournament" TEXT, "Location" TEXT, "Winner" TEXT, "Score" TEXT, "1st prize ( $ ) " FLOAT)
| What is the score from the winner Keith Clearwater (1)? | SELECT "Score" FROM table_75273 WHERE "Winner" = 'keith clearwater (1)' | SELECT "Score" FROM "table_75273" WHERE "Winner" = 'keith clearwater (1)' | 0.071289 |
CREATE TABLE table_name_22 (decision VARCHAR, record VARCHAR)
| For the game that ended with a record of 28-35-1, what was the decision? | SELECT decision FROM table_name_22 WHERE record = "28-35-1" | SELECT "decision" FROM "table_name_22" WHERE "28-35-1" = "record" | 0.063477 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.