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_75843 ("Order" TEXT, "Minister" TEXT, "Party" TEXT, "Prime Minister" TEXT, "Term start" TEXT, "Term end" TEXT, "Term in office" TEXT)
| What is the Term in office with an Order that is 9? | SELECT "Term in office" FROM table_75843 WHERE "Order" = '9' | SELECT "Term in office" FROM "table_75843" WHERE "Order" = '9' | 0.060547 |
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 program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
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 comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE area (course_id INT, area 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 semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction 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 requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
| Which courses will be held in the next 6 semesters ? | SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND semester.year = 2017) OR (semester.semester = 'WN' AND semester.year = 2018) OR (semester.semester = 'WN' AND semester.year = 2019)) AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester_id = course_offering.semester ORDER BY semester.year, semester.semester | SELECT DISTINCT "course"."name", "course"."number", "semester"."semester", "semester"."year" 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" = 'FA' AND "semester"."year" = 2016) OR ("semester"."semester" = 'FA' AND "semester"."year" = 2017) OR ("semester"."semester" = 'FA' AND "semester"."year" = 2018) OR ("semester"."semester" = 'WN' AND "semester"."year" = 2017) OR ("semester"."semester" = 'WN' AND "semester"."year" = 2018) OR ("semester"."semester" = 'WN' AND "semester"."year" = 2019)) WHERE "course"."department" = 'EECS' ORDER BY "semester"."year" NULLS FIRST, "semester"."semester" NULLS FIRST | 0.734375 |
CREATE TABLE table_59203 ("Year" FLOAT, "Lok Sabha" TEXT, "Members of Parliament" TEXT, "Party Won" TEXT, "Winner's % votes" TEXT, "Trailing Party" TEXT, "Trailing Party % votes" TEXT)
| What is Members of Parliament, when Winner's % Votes is '50.54%'? | SELECT "Members of Parliament" FROM table_59203 WHERE "Winner's % votes" = '50.54%' | SELECT "Members of Parliament" FROM "table_59203" WHERE "Winner's % votes" = '50.54%' | 0.083008 |
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE 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 days of hospital stay is greater than 13 and lab test name is epithelial cells? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "13" AND lab.label = "Epithelial Cells" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "Epithelial Cells" = "lab"."label" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "13" < "demographic"."days_stay" | 0.197266 |
CREATE TABLE table_6543 ("Year" FLOAT, "Men's singles" TEXT, "Women's singles" TEXT, "Men's doubles" TEXT, "Women's doubles" TEXT, "Mixed doubles" TEXT)
| Name the total numbe rof years for gaby weissen mireille kosmala | SELECT COUNT("Year") FROM table_6543 WHERE "Women's doubles" = 'gaby weissen mireille kosmala' | SELECT COUNT("Year") FROM "table_6543" WHERE "Women's doubles" = 'gaby weissen mireille kosmala' | 0.09375 |
CREATE TABLE table_43447 ("Date" TEXT, "Tournament" TEXT, "Surface" TEXT, "Opponent in the final" TEXT, "Score" TEXT)
| What kind of Surface has a Score of 6 4, 0 6, 6 2? | SELECT "Surface" FROM table_43447 WHERE "Score" = '6–4, 0–6, 6–2' | SELECT "Surface" FROM "table_43447" WHERE "Score" = '6–4, 0–6, 6–2' | 0.06543 |
CREATE TABLE table_name_46 (date VARCHAR, opponents VARCHAR)
| Tell me the date for opponents of raffaella bindi biljana pawlowa-dimitrova | SELECT date FROM table_name_46 WHERE opponents = "raffaella bindi biljana pawlowa-dimitrova" | SELECT "date" FROM "table_name_46" WHERE "opponents" = "raffaella bindi biljana pawlowa-dimitrova" | 0.095703 |
CREATE TABLE table_name_43 (draw VARCHAR, televote_points VARCHAR)
| Which Draw had 8 Televote Points? | SELECT COUNT(draw) FROM table_name_43 WHERE televote_points = "8" | SELECT COUNT("draw") FROM "table_name_43" WHERE "8" = "televote_points" | 0.069336 |
CREATE TABLE table_2163 ("#" FLOAT, "Player" TEXT, "Age" TEXT, "Australian Open" FLOAT, "French Open" FLOAT, "Wimbledon" FLOAT, "US Open" FLOAT)
| How many ages have Maureen Connolly Brinker as the player? | SELECT COUNT("Age") FROM table_2163 WHERE "Player" = 'Maureen Connolly Brinker' | SELECT COUNT("Age") FROM "table_2163" WHERE "Player" = 'Maureen Connolly Brinker' | 0.079102 |
CREATE TABLE table_name_66 (round VARCHAR, college VARCHAR, overall VARCHAR)
| In what Round with an Overall greater than 306 was the pick from the College of Virginia Tech? | SELECT COUNT(round) FROM table_name_66 WHERE college = "virginia tech" AND overall > 306 | SELECT COUNT("round") FROM "table_name_66" WHERE "college" = "virginia tech" AND "overall" > 306 | 0.09375 |
CREATE TABLE table_66318 ("Pick" FLOAT, "Player" TEXT, "Team" TEXT, "Position" TEXT, "School" TEXT)
| what is the school when the team is new york yankees? | SELECT "School" FROM table_66318 WHERE "Team" = 'new york yankees' | SELECT "School" FROM "table_66318" WHERE "Team" = 'new york yankees' | 0.066406 |
CREATE TABLE table_40492 ("Rank" FLOAT, "City" TEXT, "Airport" TEXT, "Passengers" FLOAT, "Carriers" TEXT)
| What was the airport with primary carrier of US Airways with a 2 ranking and more than 51,000 passengers? | SELECT "Airport" FROM table_40492 WHERE "Passengers" > '51,000' AND "Carriers" = 'us airways' AND "Rank" = '2' | SELECT "Airport" FROM "table_40492" WHERE "Carriers" = 'us airways' AND "Passengers" > '51,000' AND "Rank" = '2' | 0.109375 |
CREATE TABLE table_20628 ("No." FLOAT, "Name" TEXT, "Mi from Kingston" TEXT, "Km from Kingston" TEXT, "Parish" TEXT, "Length feet" FLOAT, "Length meters" TEXT)
| Which parishes have the highworth railroad? | SELECT "Parish" FROM table_20628 WHERE "Name" = 'Highworth' | SELECT "Parish" FROM "table_20628" WHERE "Name" = 'Highworth' | 0.05957 |
CREATE TABLE table_39536 ("Date" TEXT, "Opponent" TEXT, "Score" TEXT, "Loss" TEXT, "Attendance" FLOAT, "Record" TEXT)
| Name the date with score of 9-2 | SELECT "Date" FROM table_39536 WHERE "Score" = '9-2' | SELECT "Date" FROM "table_39536" WHERE "Score" = '9-2' | 0.052734 |
CREATE TABLE table_name_3 (score VARCHAR, home_team VARCHAR)
| What is the score of the wigan athletic home team? | SELECT score FROM table_name_3 WHERE home_team = "wigan athletic" | SELECT "score" FROM "table_name_3" WHERE "home_team" = "wigan athletic" | 0.069336 |
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 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 d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value 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 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_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 procedures_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 patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
| how much changes has patient 30235's arterial bp [systolic] second measured on the last icu visit compared to the value first measured on the last icu visit? | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30235) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1 OFFSET 1) - (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30235) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1) | WITH "_u_2" AS (SELECT "d_items"."itemid" FROM "d_items" WHERE "d_items"."label" = 'arterial bp [systolic]' AND "d_items"."linksto" = 'chartevents' GROUP BY "itemid"), "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 30235 GROUP BY "hadm_id") SELECT (SELECT "chartevents"."valuenum" FROM "chartevents" LEFT JOIN "_u_2" AS "_u_2" ON "_u_2"."" = "chartevents"."itemid" WHERE "chartevents"."icustay_id" IN (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 AND NOT "icustays"."outtime" IS NULL ORDER BY "icustays"."intime" DESC NULLS LAST LIMIT 1) AND NOT "_u_2"."" IS NULL ORDER BY "chartevents"."charttime" NULLS FIRST LIMIT 1 OFFSET 1) - (SELECT "chartevents"."valuenum" FROM "chartevents" LEFT JOIN "_u_2" AS "_u_6" ON "_u_6"."" = "chartevents"."itemid" WHERE "chartevents"."icustay_id" IN (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" AS "_u_4" ON "_u_4"."" = "icustays"."hadm_id" WHERE NOT "_u_4"."" IS NULL AND NOT "icustays"."outtime" IS NULL ORDER BY "icustays"."intime" DESC NULLS LAST LIMIT 1) AND NOT "_u_6"."" IS NULL ORDER BY "chartevents"."charttime" NULLS FIRST LIMIT 1) | 1.205078 |
CREATE TABLE table_1399994_5 (partner VARCHAR, year VARCHAR)
| How many partners were there in 1988? | SELECT COUNT(partner) FROM table_1399994_5 WHERE year = "1988" | SELECT COUNT("partner") FROM "table_1399994_5" WHERE "1988" = "year" | 0.066406 |
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 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)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
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 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 diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
| tell me the four most common intakes in 2102? | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) = '2102' GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 4 | WITH "t1" AS (SELECT "intakeoutput"."celllabel", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC NULLS LAST) AS "c1" FROM "intakeoutput" WHERE "intakeoutput"."cellpath" LIKE '%intake%' AND STRFTIME('%y', "intakeoutput"."intakeoutputtime") = '2102' GROUP BY "intakeoutput"."celllabel") SELECT "t1"."celllabel" FROM "t1" AS "t1" WHERE "t1"."c1" <= 4 | 0.333008 |
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 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 Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId 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 ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description 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 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 FlagTypes (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 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 PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
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 PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
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 ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
| Most viewed posts of me. | SELECT Id AS "post_link", ViewCount, Score, Tags FROM Posts WHERE Posts.OwnerUserId = @UserId AND ViewCount > 0 ORDER BY ViewCount DESC, Score DESC LIMIT 20 | SELECT "Id" AS "post_link", "ViewCount", "Score", "Tags" FROM "Posts" WHERE "Posts"."OwnerUserId" = $UserId AND "ViewCount" > 0 ORDER BY "ViewCount" DESC NULLS LAST, "Score" DESC NULLS LAST LIMIT 20 | 0.193359 |
CREATE TABLE table_60790 ("Player" TEXT, "Country" TEXT, "Year ( s ) won" TEXT, "Total" FLOAT, "To par" TEXT, "Finish" TEXT)
| What years did the player with a t71 finish win? | SELECT "Year(s) won" FROM table_60790 WHERE "Finish" = 't71' | SELECT "Year(s) won" FROM "table_60790" WHERE "Finish" = 't71' | 0.060547 |
CREATE TABLE table_17085724_1 (indianapolis_concerts VARCHAR, character VARCHAR)
| Name the indanapolis concerts for dr. alexandre manette | SELECT indianapolis_concerts FROM table_17085724_1 WHERE character = "Dr. Alexandre Manette" | SELECT "indianapolis_concerts" FROM "table_17085724_1" WHERE "Dr. Alexandre Manette" = "character" | 0.095703 |
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 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)
| provide the number of patients whose insurance is medicare and lab test name is wbc? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicare" AND lab.label = "WBC" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "WBC" = "lab"."label" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "Medicare" = "demographic"."insurance" | 0.19043 |
CREATE TABLE Photos (Photo_ID INT, Tourist_Attraction_ID INT, Name VARCHAR, Description VARCHAR, Filename VARCHAR, Other_Details VARCHAR)
CREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code CHAR, star_rating_description VARCHAR)
CREATE TABLE Shops (Shop_ID INT, Shop_Details VARCHAR)
CREATE TABLE Hotels (hotel_id INT, star_rating_code CHAR, pets_allowed_yn CHAR, price_range FLOAT, other_hotel_details VARCHAR)
CREATE TABLE Museums (Museum_ID INT, Museum_Details VARCHAR)
CREATE TABLE Features (Feature_ID INT, Feature_Details VARCHAR)
CREATE TABLE Street_Markets (Market_ID INT, Market_Details VARCHAR)
CREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID INT, Feature_ID INT)
CREATE TABLE Royal_Family (Royal_Family_ID INT, Royal_Family_Details VARCHAR)
CREATE TABLE Visits (Visit_ID INT, Tourist_Attraction_ID INT, Tourist_ID INT, Visit_Date DATETIME, Visit_Details VARCHAR)
CREATE TABLE Staff (Staff_ID INT, Tourist_Attraction_ID INT, Name VARCHAR, Other_Details VARCHAR)
CREATE TABLE Visitors (Tourist_ID INT, Tourist_Details VARCHAR)
CREATE TABLE Tourist_Attractions (Tourist_Attraction_ID INT, Attraction_Type_Code CHAR, Location_ID INT, How_to_Get_There VARCHAR, Name VARCHAR, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR)
CREATE TABLE Locations (Location_ID INT, Location_Name VARCHAR, Address VARCHAR, Other_Details VARCHAR)
CREATE TABLE Theme_Parks (Theme_Park_ID INT, Theme_Park_Details VARCHAR)
CREATE TABLE Ref_Attraction_Types (Attraction_Type_Code CHAR, Attraction_Type_Description VARCHAR)
| Show the names and ids of tourist attractions that are visited at most once in a pie chart. | SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID | SELECT "T1"."Name", "T1"."Tourist_Attraction_ID" FROM "Tourist_Attractions" AS "T1" JOIN "Visits" AS "T2" ON "T1"."Tourist_Attraction_ID" = "T2"."Tourist_Attraction_ID" | 0.164063 |
CREATE TABLE table_11642945_1 (viewers VARCHAR, director VARCHAR)
| Which viewers had Matt Gallagher as the director? | SELECT viewers FROM table_11642945_1 WHERE director = "Matt Gallagher" | SELECT "viewers" FROM "table_11642945_1" WHERE "Matt Gallagher" = "director" | 0.074219 |
CREATE TABLE table_29302711_12 (prize_money__usd_ INT, name VARCHAR)
| how much prize money (in USD) did bob lutz win | SELECT MAX(prize_money__usd_) FROM table_29302711_12 WHERE name = "Bob Lutz" | SELECT MAX("prize_money__usd_") FROM "table_29302711_12" WHERE "Bob Lutz" = "name" | 0.080078 |
CREATE TABLE table_name_20 (constructor VARCHAR, chassis VARCHAR, driver VARCHAR)
| Who constructed the car that Derek Warwick raced in with a TG181 chassis? | SELECT constructor FROM table_name_20 WHERE chassis = "tg181" AND driver = "derek warwick" | SELECT "constructor" FROM "table_name_20" WHERE "chassis" = "tg181" AND "derek warwick" = "driver" | 0.095703 |
CREATE TABLE table_14673 ("Type" TEXT, "Fleet numbers" TEXT, "Quantity made" TEXT, "Date made" TEXT, "GSR Class" TEXT, "Inchicore Class" TEXT, "GSR Nos." TEXT, "Withdrawn" TEXT)
| What was the quantity of the fleet information for DWWR 50 and 51? | SELECT "Quantity made" FROM table_14673 WHERE "Fleet numbers" = 'dwwr 50 and 51' | SELECT "Quantity made" FROM "table_14673" WHERE "Fleet numbers" = 'dwwr 50 and 51' | 0.080078 |
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 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 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 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 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)
| count how many hospital visits patient 015-66570 has in this year. | SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '015-66570' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | SELECT COUNT(DISTINCT "patient"."patienthealthsystemstayid") FROM "patient" WHERE "patient"."uniquepid" = '015-66570' AND DATETIME("patient"."hospitaladmittime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | 0.227539 |
CREATE TABLE table_177273_2 (surface VARCHAR, score VARCHAR)
| On what surface was the game played with a score of 6 4, 6 4? | SELECT surface FROM table_177273_2 WHERE score = "6–4, 6–4" | SELECT "surface" FROM "table_177273_2" WHERE "6–4, 6–4" = "score" | 0.063477 |
CREATE TABLE table_1341423_40 (party VARCHAR, candidates VARCHAR)
| what is the party when candidates is jim demint (r) 80%? | SELECT party FROM table_1341423_40 WHERE candidates = "Jim DeMint (R) 80%" | SELECT "party" FROM "table_1341423_40" WHERE "Jim DeMint (R) 80%" = "candidates" | 0.078125 |
CREATE TABLE table_name_58 (score VARCHAR, tie_no VARCHAR)
| What is the score when the tie number is 6? | SELECT score FROM table_name_58 WHERE tie_no = "6" | SELECT "score" FROM "table_name_58" WHERE "6" = "tie_no" | 0.054688 |
CREATE TABLE table_13418 ("Week" FLOAT, "Date" TEXT, "Opponent" TEXT, "Result" TEXT, "Record" TEXT, "Attendance" TEXT)
| What is the Record of the game with an Attendance of 70,604? | SELECT "Record" FROM table_13418 WHERE "Attendance" = '70,604' | SELECT "Record" FROM "table_13418" WHERE "Attendance" = '70,604' | 0.0625 |
CREATE TABLE table_45227 ("Game" FLOAT, "Date" TEXT, "Team" TEXT, "Score" TEXT, "High points" TEXT, "High rebounds" TEXT, "High assists" TEXT, "Location Attendance" TEXT, "Record" TEXT)
| Who was the team for game 34? | SELECT "Team" FROM table_45227 WHERE "Game" = '34' | SELECT "Team" FROM "table_45227" WHERE "Game" = '34' | 0.050781 |
CREATE TABLE table_49860 ("Province" TEXT, "Skip" TEXT, "Ends Won" FLOAT, "Ends Lost" FLOAT, "Blank Ends" FLOAT, "Stolen Ends" FLOAT, "Shot Pct." FLOAT)
| What is the lowest Shot Pct., when Blank Ends is greater than 6? | SELECT MIN("Shot Pct.") FROM table_49860 WHERE "Blank Ends" > '6' | SELECT MIN("Shot Pct.") FROM "table_49860" WHERE "Blank Ends" > '6' | 0.06543 |
CREATE TABLE table_name_88 (game_1 VARCHAR, position VARCHAR)
| Which Game 1 has a fullback? | SELECT game_1 FROM table_name_88 WHERE position = "fullback" | SELECT "game_1" FROM "table_name_88" WHERE "fullback" = "position" | 0.064453 |
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, what is the relationship between price and code , and group by attribute name? | SELECT T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name | SELECT "T1"."Price", "T1"."Code" FROM "Products" AS "T1" JOIN "Manufacturers" AS "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "Name" | 0.134766 |
CREATE TABLE table_20648 ("Province" TEXT, "Map #" FLOAT, "ISO 3166-2:AF" TEXT, "Centers" TEXT, "Population" FLOAT, "Area ( km\\u00b2 ) " FLOAT, "Language" TEXT, "Notes" TEXT, "U.N. Region" TEXT)
| Name the notes for samangan | SELECT "Notes" FROM table_20648 WHERE "Province" = 'Samangan' | SELECT "Notes" FROM "table_20648" WHERE "Province" = 'Samangan' | 0.061523 |
CREATE TABLE table_238124_1 (bleeding_time VARCHAR, condition VARCHAR)
| What is the bleeding time for glanzmann's thrombasthenia? | SELECT bleeding_time FROM table_238124_1 WHERE condition = "Glanzmann's thrombasthenia" | SELECT "bleeding_time" FROM "table_238124_1" WHERE "Glanzmann's thrombasthenia" = "condition" | 0.09082 |
CREATE TABLE table_203_299 (id DECIMAL, "year" DECIMAL, "competition" TEXT, "venue" TEXT, "position" TEXT, "notes" TEXT)
| how many 4x 100m relays were run ? | SELECT COUNT(*) FROM table_203_299 WHERE "notes" = '4x100m relay' | SELECT COUNT(*) FROM "table_203_299" WHERE "notes" = '4x100m relay' | 0.06543 |
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, find name and the sum of code , and group by attribute name, and visualize them by a bar chart, and show by the x axis in descending please. | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | SELECT "T2"."Name", "T1"."Code" FROM "Products" AS "T1" JOIN "Manufacturers" AS "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "T2"."Name" ORDER BY "T2"."Name" DESC NULLS LAST | 0.174805 |
CREATE TABLE table_53537 ("Driver" TEXT, "Constructor" TEXT, "Laps" FLOAT, "Time/retired" TEXT, "Grid" FLOAT)
| what is the grid when the driver is pierre levegh? | SELECT "Grid" FROM table_53537 WHERE "Driver" = 'pierre levegh' | SELECT "Grid" FROM "table_53537" WHERE "Driver" = 'pierre levegh' | 0.063477 |
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
| how many patients aged below 79 years had neb as the drug route? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "79" AND prescriptions.route = "NEB" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "NEB" = "prescriptions"."route" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "79" > "demographic"."age" | 0.208008 |
CREATE TABLE table_43025 ("Week" FLOAT, "Date" TEXT, "Opponent" TEXT, "Result" TEXT, "Attendance" TEXT)
| How many people attended the game in week 13? | SELECT "Attendance" FROM table_43025 WHERE "Week" = '13' | SELECT "Attendance" FROM "table_43025" WHERE "Week" = '13' | 0.056641 |
CREATE TABLE Acceptance (Submission_ID INT, Workshop_ID INT, Result TEXT)
CREATE TABLE submission (Submission_ID INT, Scores FLOAT, Author TEXT, College TEXT)
CREATE TABLE workshop (Workshop_ID INT, Date TEXT, Venue TEXT, Name TEXT)
| How many workshops did each author submit to? Return the author name and the number of workshops Plot them as bar chart, and list X-axis in asc order. | SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY Author | SELECT "Author", COUNT(DISTINCT "T1"."Workshop_ID") FROM "Acceptance" AS "T1" JOIN "submission" AS "T2" ON "T1"."Submission_ID" = "T2"."Submission_ID" ORDER BY "Author" NULLS FIRST | 0.175781 |
CREATE TABLE table_name_80 (venue VARCHAR, away_team VARCHAR)
| What is the venue when fitzroy was the away team? | SELECT venue FROM table_name_80 WHERE away_team = "fitzroy" | SELECT "venue" FROM "table_name_80" WHERE "away_team" = "fitzroy" | 0.063477 |
CREATE TABLE COURSE (CRS_CODE VARCHAR, DEPT_CODE VARCHAR, CRS_DESCRIPTION VARCHAR, CRS_CREDIT FLOAT)
CREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR, DEPT_NAME VARCHAR, SCHOOL_CODE VARCHAR, EMP_NUM INT, DEPT_ADDRESS VARCHAR, DEPT_EXTENSION VARCHAR)
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)
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 ENROLL (CLASS_CODE VARCHAR, STU_NUM INT, ENROLL_GRADE VARCHAR)
| Return a bar chart on how many different professors are there for the different schools?, list in asc by the X. | SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE ORDER BY SCHOOL_CODE | SELECT "SCHOOL_CODE", COUNT(*) FROM "DEPARTMENT" AS "T1" JOIN "PROFESSOR" AS "T2" ON "T1"."DEPT_CODE" = "T2"."DEPT_CODE" GROUP BY "T1"."SCHOOL_CODE" ORDER BY "SCHOOL_CODE" NULLS FIRST | 0.178711 |
CREATE TABLE table_name_87 (week VARCHAR, date VARCHAR)
| What week was it on November 19, 1995? | SELECT week FROM table_name_87 WHERE date = "november 19, 1995" | SELECT "week" FROM "table_name_87" WHERE "date" = "november 19, 1995" | 0.067383 |
CREATE TABLE table_2387461_1 (games_played VARCHAR, points_per_game VARCHAR)
| How many games played have 4.7 as points per game? | SELECT games_played FROM table_2387461_1 WHERE points_per_game = "4.7" | SELECT "games_played" FROM "table_2387461_1" WHERE "4.7" = "points_per_game" | 0.074219 |
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 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 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 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)
| how many days have elapsed since patient 015-23047's last stay in the ward 608 during this hospital visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '015-23047' AND patient.wardid = 608 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', "patient"."unitadmittime")) FROM "patient" WHERE "patient"."hospitaldischargetime" IS NULL AND "patient"."uniquepid" = '015-23047' AND "patient"."wardid" = 608 ORDER BY "patient"."unitadmittime" DESC NULLS LAST LIMIT 1 | 0.271484 |
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 diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE 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 vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
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)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
| what specimen test was given for the last time to patient 031-23605 until 09/2105? | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23605')) AND STRFTIME('%y-%m', microlab.culturetakentime) <= '2105-09' ORDER BY microlab.culturetakentime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '031-23605' 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"."culturesite" FROM "microlab" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "microlab"."patientunitstayid" WHERE NOT "_u_1"."" IS NULL AND STRFTIME('%y-%m', "microlab"."culturetakentime") <= '2105-09' ORDER BY "microlab"."culturetakentime" DESC NULLS LAST LIMIT 1 | 0.620117 |
CREATE TABLE table_66324 ("Producer" TEXT, "Product" TEXT, "Samples taken" FLOAT, "Samples failed" FLOAT, "Melamine content ( mg/kg ) " FLOAT)
| How many samples taken from producer Qingdao Suncare Nutritional Technology with a melamine content less than 53.4? | SELECT SUM("Samples taken") FROM table_66324 WHERE "Melamine content(mg/kg)" < '53.4' AND "Producer" = 'qingdao suncare nutritional technology' | SELECT SUM("Samples taken") FROM "table_66324" WHERE "Melamine content(mg/kg)" < '53.4' AND "Producer" = 'qingdao suncare nutritional technology' | 0.141602 |
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
| how many patients whose drug code is hepa10s and lab test fluid is ascites? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "HEPA10S" AND lab.fluid = "Ascites" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "Ascites" = "lab"."fluid" AND "demographic"."hadm_id" = "lab"."hadm_id" JOIN "prescriptions" ON "HEPA10S" = "prescriptions"."formulary_drug_cd" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" | 0.275391 |
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime 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 medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime 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 treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
| what's the minimum hospital cost if there is seizures - from ischemia/infarction last year? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'seizures - from ischemia/infarction')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY cost.patienthealthsystemstayid) AS t1 | WITH "_u_0" AS (SELECT "diagnosis"."patientunitstayid" FROM "diagnosis" WHERE "diagnosis"."diagnosisname" = 'seizures - from ischemia/infarction' GROUP BY "patientunitstayid"), "_u_1" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patientunitstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patienthealthsystemstayid"), "t1" AS (SELECT SUM("cost"."cost") AS "c1" FROM "cost" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "cost"."patienthealthsystemstayid" WHERE DATETIME("cost"."chargetime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND NOT "_u_1"."" IS NULL GROUP BY "cost"."patienthealthsystemstayid") SELECT MIN("t1"."c1") FROM "t1" AS "t1" | 0.719727 |
CREATE TABLE table_name_30 (date VARCHAR, record VARCHAR)
| Which Date has a Record of 3-4? | SELECT date FROM table_name_30 WHERE record = "3-4" | SELECT "date" FROM "table_name_30" WHERE "3-4" = "record" | 0.055664 |
CREATE TABLE Ref_budget_codes (budget_type_code VARCHAR, budget_type_description VARCHAR)
| List all budget type codes and descriptions. | SELECT budget_type_code, budget_type_description FROM Ref_budget_codes | SELECT "budget_type_code", "budget_type_description" FROM "Ref_budget_codes" | 0.074219 |
CREATE TABLE table_44234 ("Round" FLOAT, "Pick" FLOAT, "Player" TEXT, "Position" TEXT, "School/Club Team" TEXT)
| Which Pick has a Position of offensive guard, a Player of reggie mckenzie, and a Round larger than 2? | SELECT COUNT("Pick") FROM table_44234 WHERE "Position" = 'offensive guard' AND "Player" = 'reggie mckenzie' AND "Round" > '2' | SELECT COUNT("Pick") FROM "table_44234" WHERE "Player" = 'reggie mckenzie' AND "Position" = 'offensive guard' AND "Round" > '2' | 0.124023 |
CREATE TABLE table_59620 ("Place" TEXT, "Player" TEXT, "Country" TEXT, "Score" TEXT, "To par" TEXT)
| Who has a Score of 68-71-70=208? | SELECT "Player" FROM table_59620 WHERE "Score" = '68-71-70=208' | SELECT "Player" FROM "table_59620" WHERE "Score" = '68-71-70=208' | 0.063477 |
CREATE TABLE table_75738 ("Name" TEXT, "Space Agency" TEXT, "Launch Date" TEXT, "Terminated" TEXT, "Location" TEXT)
| Which space agency launched the herschel space observatory? | SELECT "Space Agency" FROM table_75738 WHERE "Name" = 'herschel space observatory' | SELECT "Space Agency" FROM "table_75738" WHERE "Name" = 'herschel space observatory' | 0.082031 |
CREATE TABLE table_66327 ("Date" TEXT, "Internet Explorer" TEXT, "Firefox" TEXT, "Opera" TEXT, "Safari" TEXT, "Source" TEXT)
| Which source has a date of June 2008? | SELECT "Source" FROM table_66327 WHERE "Date" = 'june 2008' | SELECT "Source" FROM "table_66327" WHERE "Date" = 'june 2008' | 0.05957 |
CREATE TABLE table_30361 ("Year" FLOAT, "Date" TEXT, "Driver" TEXT, "Team" TEXT, "Manufacturer" TEXT, "Laps" TEXT, "Miles ( km ) " TEXT, "Race Time" TEXT, "Average Speed ( mph ) " TEXT)
| List the race time for may 11. | SELECT "Race Time" FROM table_30361 WHERE "Date" = 'May 11' | SELECT "Race Time" FROM "table_30361" WHERE "Date" = 'May 11' | 0.05957 |
CREATE TABLE table_659 ("No. in series" FLOAT, "No. in season" FLOAT, "Title" TEXT, "Directed by" TEXT, "Written by" TEXT, "Original air date" TEXT, "U.S. viewers ( million ) " TEXT)
| When did the episode 'Hell bent for leather' originally air? | SELECT "Original air date" FROM table_659 WHERE "Title" = 'Hell Bent for Leather' | SELECT "Original air date" FROM "table_659" WHERE "Title" = 'Hell Bent for Leather' | 0.081055 |
CREATE TABLE table_13403120_1 (writer_s_ VARCHAR, prodcode VARCHAR)
| who is the writer of the episode with prod.code 30-17 | SELECT writer_s_ FROM table_13403120_1 WHERE prodcode = "30-17" | SELECT "writer_s_" FROM "table_13403120_1" WHERE "30-17" = "prodcode" | 0.067383 |
CREATE TABLE table_45215 ("Tournament" TEXT, "2002" TEXT, "2004" TEXT, "2005" TEXT, "2006" TEXT)
| What shows for 2006 when 2002 is Grand Slam Tournaments? | SELECT "2006" FROM table_45215 WHERE "2002" = 'grand slam tournaments' | SELECT "2006" FROM "table_45215" WHERE "2002" = 'grand slam tournaments' | 0.070313 |
CREATE TABLE table_74459 ("Game" FLOAT, "Date" TEXT, "Team" TEXT, "Score" TEXT, "High points" TEXT, "High rebounds" TEXT, "High assists" TEXT, "Location Attendance" TEXT, "Series" TEXT)
| Who did the high assists in the game where Charles Barkley (21) did the high points? | SELECT "High assists" FROM table_74459 WHERE "High points" = 'Charles Barkley (21)' | SELECT "High assists" FROM "table_74459" WHERE "High points" = 'Charles Barkley (21)' | 0.083008 |
CREATE TABLE railway (Railway_ID INT, Railway TEXT, Builder TEXT, Built TEXT, Wheels TEXT, Location TEXT, ObjectNumber TEXT)
CREATE TABLE train (Train_ID INT, Train_Num TEXT, Name TEXT, From TEXT, Arrival TEXT, Railway_ID INT)
CREATE TABLE railway_manage (Railway_ID INT, Manager_ID INT, From_Year TEXT)
CREATE TABLE manager (Manager_ID INT, Name TEXT, Country TEXT, Working_year_starts TEXT, Age INT, Level INT)
| List the builders of railways in ascending alphabetical order, and count them by a bar chart | SELECT Builder, COUNT(Builder) FROM railway GROUP BY Builder ORDER BY Builder | SELECT "Builder", COUNT("Builder") FROM "railway" GROUP BY "Builder" ORDER BY "Builder" NULLS FIRST | 0.09668 |
CREATE TABLE table_name_4 (team VARCHAR, location_attendance VARCHAR)
| Which Team has a Location Attendance of fedexforum 11,731? | SELECT team FROM table_name_4 WHERE location_attendance = "fedexforum 11,731" | SELECT "team" FROM "table_name_4" WHERE "fedexforum 11,731" = "location_attendance" | 0.081055 |
CREATE TABLE table_68107 ("Year" TEXT, "Team" TEXT, "TTkl" FLOAT, "Solo" FLOAT, "Sacks" FLOAT, "Pass Def" FLOAT)
| How many sacks have 2006 as the year, and a solo less than 62? | SELECT SUM("Sacks") FROM table_68107 WHERE "Year" = '2006' AND "Solo" < '62' | SELECT SUM("Sacks") FROM "table_68107" WHERE "Solo" < '62' AND "Year" = '2006' | 0.076172 |
CREATE TABLE table_name_52 (week INT, opponent VARCHAR)
| Which week with Green Bay Packers as an opponent is the highest? | SELECT MAX(week) FROM table_name_52 WHERE opponent = "green bay packers" | SELECT MAX("week") FROM "table_name_52" WHERE "green bay packers" = "opponent" | 0.076172 |
CREATE TABLE table_25691838_8 (production_code INT, original_airdate VARCHAR)
| What was the smallest production code for August 11's original episode? | SELECT MIN(production_code) FROM table_25691838_8 WHERE original_airdate = "August 11" | SELECT MIN("production_code") FROM "table_25691838_8" WHERE "August 11" = "original_airdate" | 0.089844 |
CREATE TABLE table_31956 ("Date" TEXT, "Opponent" TEXT, "Venue" TEXT, "Result" TEXT, "Attendance" FLOAT)
| Name the date of st albans city for result of drew 0-0 | SELECT "Date" FROM table_31956 WHERE "Opponent" = 'st albans city' AND "Result" = 'drew 0-0' | SELECT "Date" FROM "table_31956" WHERE "Opponent" = 'st albans city' AND "Result" = 'drew 0-0' | 0.091797 |
CREATE TABLE station (Station_ID INT, Name TEXT, Annual_entry_exit FLOAT, Annual_interchanges FLOAT, Total_Passengers FLOAT, Location TEXT, Main_Services TEXT, Number_of_Platforms INT)
CREATE TABLE train (Train_ID INT, Name TEXT, Time TEXT, Service TEXT)
CREATE TABLE train_station (Train_ID INT, Station_ID INT)
| A bar chart shows how many locations, and sort from high to low by the X. | SELECT Location, COUNT(Location) FROM station GROUP BY Location ORDER BY Location DESC | SELECT "Location", COUNT("Location") FROM "station" GROUP BY "Location" ORDER BY "Location" DESC NULLS LAST | 0.104492 |
CREATE TABLE table_name_11 (wins INT, against VARCHAR, losses VARCHAR)
| Can you tell me the average Wins that has the Against of 1132, and the Losses smaller than 7? | SELECT AVG(wins) FROM table_name_11 WHERE against = 1132 AND losses < 7 | SELECT AVG("wins") FROM "table_name_11" WHERE "against" = 1132 AND "losses" < 7 | 0.077148 |
CREATE TABLE table_65810 ("Airing date" TEXT, "English title ( Chinese title ) " TEXT, "Number of episodes" FLOAT, "Genre" TEXT, "Official website" TEXT)
| What's the airing date of Armed Reaction with 20 episodes in the Modern Action genre having an official website? | SELECT "Airing date" FROM table_65810 WHERE "Official website" = 'official website' AND "Number of episodes" = '20' AND "Genre" = 'modern action' AND "English title (Chinese title)" = 'armed reaction 陀槍師姐' | SELECT "Airing date" FROM "table_65810" WHERE "English title (Chinese title)" = 'armed reaction 陀槍師姐' AND "Genre" = 'modern action' AND "Number of episodes" = '20' AND "Official website" = 'official website' | 0.202148 |
CREATE TABLE table_name_37 (mayor VARCHAR, election VARCHAR, municipality VARCHAR)
| What is the Mayor of Riva del Garda in 2010? | SELECT mayor FROM table_name_37 WHERE election = 2010 AND municipality = "riva del garda" | SELECT "mayor" FROM "table_name_37" WHERE "election" = 2010 AND "municipality" = "riva del garda" | 0.094727 |
CREATE TABLE table_name_18 (date VARCHAR, home_team VARCHAR)
| What was the date of the game where Geelong was the home team? | SELECT date FROM table_name_18 WHERE home_team = "geelong" | SELECT "date" FROM "table_name_18" WHERE "geelong" = "home_team" | 0.0625 |
CREATE TABLE ref_characteristic_types (characteristic_type_code TEXT, characteristic_type_description TEXT)
CREATE TABLE characteristics (characteristic_id DECIMAL, characteristic_type_code TEXT, characteristic_data_type TEXT, characteristic_name TEXT, other_characteristic_details TEXT)
CREATE TABLE products (product_id DECIMAL, color_code TEXT, product_category_code TEXT, product_name TEXT, typical_buying_price TEXT, typical_selling_price TEXT, product_description TEXT, other_product_details TEXT)
CREATE TABLE ref_colors (color_code TEXT, color_description TEXT)
CREATE TABLE ref_product_categories (product_category_code TEXT, product_category_description TEXT, unit_of_measure TEXT)
CREATE TABLE product_characteristics (product_id DECIMAL, characteristic_id DECIMAL, product_characteristic_value TEXT)
| Find the product names that are colored 'white' but do not have unit of measurement 'Handful'. | SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure <> "Handful" | SELECT "t1"."product_name" FROM "products" AS "t1" JOIN "ref_product_categories" AS "t2" ON "Handful" <> "t2"."unit_of_measure" AND "t1"."product_category_code" = "t2"."product_category_code" JOIN "ref_colors" AS "t3" ON "t1"."color_code" = "t3"."color_code" AND "t3"."color_description" = "white" | 0.290039 |
CREATE TABLE table_203_308 (id DECIMAL, "athlete" TEXT, "nation" TEXT, "olympics" TEXT, "gold" DECIMAL, "silver" DECIMAL, "bronze" DECIMAL, "total" DECIMAL)
| who has more silver medals : karine ruby or shaun white ? | SELECT "athlete" FROM table_203_308 WHERE "athlete" IN ('karine ruby', 'shaun white') ORDER BY "silver" DESC LIMIT 1 | SELECT "athlete" FROM "table_203_308" WHERE "athlete" IN ('karine ruby', 'shaun white') ORDER BY "silver" DESC NULLS LAST LIMIT 1 | 0.125977 |
CREATE TABLE table_29320 ("No. in series" FLOAT, "No. in season" FLOAT, "Title" TEXT, "Directed by" TEXT, "Written by" TEXT, "Original air date" TEXT, "Production code" TEXT, "U.S. viewers ( million ) " TEXT)
| What's the title in the number 10 in the season? | SELECT "Title" FROM table_29320 WHERE "No. in season" = '10' | SELECT "Title" FROM "table_29320" WHERE "No. in season" = '10' | 0.060547 |
CREATE TABLE table_29139 ("Team" TEXT, "Outgoing manager" TEXT, "Manner of departure" TEXT, "Date of vacancy" TEXT, "Incoming manager" TEXT, "Date of appointment" TEXT, "Position in Table" TEXT)
| What is the position in table when the date of vacancy was 4 january 2011? | SELECT "Position in Table" FROM table_29139 WHERE "Date of vacancy" = '4 January 2011' | SELECT "Position in Table" FROM "table_29139" WHERE "Date of vacancy" = '4 January 2011' | 0.085938 |
CREATE TABLE table_68249 ("Nation" TEXT, "Gold" FLOAT, "Silver" FLOAT, "Bronze" FLOAT, "Total" FLOAT)
| What is the highest number of silver medals that Ireland earned when they scored less than 3 bronze medals and earned 1 medal? | SELECT MAX("Silver") FROM table_68249 WHERE "Bronze" < '3' AND "Gold" < '1' AND "Total" = '1' AND "Nation" = 'ireland' | SELECT MAX("Silver") FROM "table_68249" WHERE "Bronze" < '3' AND "Gold" < '1' AND "Nation" = 'ireland' AND "Total" = '1' | 0.117188 |
CREATE TABLE table_4644 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| What is the highest crowd population when the away team is Geelong? | SELECT MAX("Crowd") FROM table_4644 WHERE "Away team" = 'geelong' | SELECT MAX("Crowd") FROM "table_4644" WHERE "Away team" = 'geelong' | 0.06543 |
CREATE TABLE table_name_12 (outcome VARCHAR, event VARCHAR, venue VARCHAR)
| What is the Outcome of the Singles Event in London, England? | SELECT outcome FROM table_name_12 WHERE event = "singles" AND venue = "london, england" | SELECT "outcome" FROM "table_name_12" WHERE "event" = "singles" AND "london, england" = "venue" | 0.092773 |
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE ReviewTaskResultTypes (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 SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name 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 Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE 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 Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
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)
| Top 500 SciFi Questions (Score/ViewCount). | SELECT Title, Body, ViewCount, Score, Score / (ViewCount * 1.00) AS Ratio FROM Posts AS p JOIN PostTypes AS pt ON p.PostTypeId = pt.Id WHERE pt.Name = 'Question' AND (Score > '##questionScore:int##' OR ViewCount > '##questionViews:int##') ORDER BY Ratio DESC LIMIT 500 | SELECT "Title", "Body", "ViewCount", "Score", "Score" / NULLIF(("ViewCount" * 1.00), 0) AS "Ratio" FROM "Posts" AS "p" JOIN "PostTypes" AS "pt" ON "p"."PostTypeId" = "pt"."Id" AND "pt"."Name" = 'Question' WHERE "Score" > '##questionScore:int##' OR "ViewCount" > '##questionViews:int##' ORDER BY "Ratio" DESC NULLS LAST LIMIT 500 | 0.320313 |
CREATE TABLE table_18862490_2 (year INT, score VARCHAR)
| What is the first yar that someone won with a score of 68-66-68-71=273? | SELECT MIN(year) FROM table_18862490_2 WHERE score = 68 - 66 - 68 - 71 = 273 | SELECT MIN("year") FROM "table_18862490_2" WHERE "score" = FALSE | 0.0625 |
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 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 vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime 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 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 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)
| what are the five most commonly prescribed drugs that were prescribed to the patients 40s in the same hospital encounter after having been diagnosed with sepsis - sepsis with multi-organ dysfunction until 1 year ago? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis - sepsis with multi-organ dysfunction' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.age BETWEEN 40 AND 49 AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5 | WITH "t2" AS (SELECT "patient"."uniquepid", "medication"."drugname", "medication"."drugstarttime", "patient"."patienthealthsystemstayid" FROM "medication" JOIN "patient" ON "medication"."patientunitstayid" = "patient"."patientunitstayid" AND "patient"."age" <= 49 AND "patient"."age" >= 40 WHERE DATETIME("medication"."drugstarttime") <= DATETIME(CURRENT_TIME(), '-1 year')), "t3" AS (SELECT "t2"."drugname", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC NULLS LAST) AS "c1" FROM "diagnosis" JOIN "patient" ON "diagnosis"."patientunitstayid" = "patient"."patientunitstayid" JOIN "t2" AS "t2" ON "diagnosis"."diagnosistime" < "t2"."drugstarttime" AND "patient"."patienthealthsystemstayid" = "t2"."patienthealthsystemstayid" AND "patient"."uniquepid" = "t2"."uniquepid" WHERE "diagnosis"."diagnosisname" = 'sepsis - sepsis with multi-organ dysfunction' AND DATETIME("diagnosis"."diagnosistime") <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY "t2"."drugname") SELECT "t3"."drugname" FROM "t3" AS "t3" WHERE "t3"."c1" <= 5 | 0.991211 |
CREATE TABLE table_43274 ("element" TEXT, "group" FLOAT, "period" FLOAT, "reaction" TEXT, "potential" TEXT)
| Which potential's period 5 is 4 and has an element of antimony? | SELECT "potential" FROM table_43274 WHERE "period" = '5' AND "element" = 'antimony' | SELECT "potential" FROM "table_43274" WHERE "element" = 'antimony' AND "period" = '5' | 0.083008 |
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE procedures_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 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 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 diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto 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_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label 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)
| what is the name of the treatment that patient 17237 had been given two times in 05/last year? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17237) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', procedures_icd.charttime) = '05' GROUP BY procedures_icd.icd9_code) AS t1 WHERE t1.c1 = 2) | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 17237 GROUP BY "hadm_id"), "t1" AS (SELECT "procedures_icd"."icd9_code", COUNT("procedures_icd"."charttime") AS "c1" FROM "procedures_icd" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "procedures_icd"."hadm_id" WHERE DATETIME("procedures_icd"."charttime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND NOT "_u_0"."" IS NULL AND STRFTIME('%m', "procedures_icd"."charttime") = '05' GROUP BY "procedures_icd"."icd9_code"), "_u_1" AS (SELECT "t1"."icd9_code" FROM "t1" AS "t1" WHERE "t1"."c1" = 2 GROUP BY "icd9_code") SELECT "d_icd_procedures"."short_title" FROM "d_icd_procedures" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "d_icd_procedures"."icd9_code" WHERE NOT "_u_1"."" IS NULL | 0.785156 |
CREATE TABLE table_104858_1 (admits_boys_girls VARCHAR, year_member_organization_was_founded VARCHAR, name_of_member_organization VARCHAR)
| Does the Ghana Scout Association (founded in 1912) admit boys, girls, or both? | SELECT admits_boys_girls FROM table_104858_1 WHERE year_member_organization_was_founded = "1912" AND name_of_member_organization = "The Ghana Scout Association" | SELECT "admits_boys_girls" FROM "table_104858_1" WHERE "1912" = "year_member_organization_was_founded" AND "The Ghana Scout Association" = "name_of_member_organization" | 0.164063 |
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 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 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)
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 treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
| indicate the daily minimum amount of sao2 for patient 027-111412 in 08/2105. | SELECT MIN(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-111412')) AND NOT vitalperiodic.sao2 IS NULL AND STRFTIME('%y-%m', vitalperiodic.observationtime) = '2105-08' GROUP BY STRFTIME('%y-%m-%d', vitalperiodic.observationtime) | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '027-111412' 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 MIN("vitalperiodic"."sao2") FROM "vitalperiodic" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "vitalperiodic"."patientunitstayid" WHERE NOT "_u_1"."" IS NULL AND NOT "vitalperiodic"."sao2" IS NULL AND STRFTIME('%y-%m', "vitalperiodic"."observationtime") = '2105-08' GROUP BY STRFTIME('%y-%m-%d', "vitalperiodic"."observationtime") | 0.676758 |
CREATE TABLE table_name_31 (year VARCHAR, engine VARCHAR)
| Which year has has a Engine of maserati straight-6? | SELECT COUNT(year) FROM table_name_31 WHERE engine = "maserati straight-6" | SELECT COUNT("year") FROM "table_name_31" WHERE "engine" = "maserati straight-6" | 0.078125 |
CREATE TABLE table_name_16 (gold INT, rank VARCHAR, total VARCHAR)
| Tell me the lowest gold for rank of 6 and total less than 2 | SELECT MIN(gold) FROM table_name_16 WHERE rank = "6" AND total < 2 | SELECT MIN("gold") FROM "table_name_16" WHERE "6" = "rank" AND "total" < 2 | 0.072266 |
CREATE TABLE procedures (code DECIMAL, name TEXT, cost DECIMAL)
CREATE TABLE nurse (employeeid DECIMAL, name TEXT, position TEXT, registered BOOLEAN, ssn DECIMAL)
CREATE TABLE on_call (nurse DECIMAL, blockfloor DECIMAL, blockcode DECIMAL, oncallstart TIME, oncallend TIME)
CREATE TABLE stay (stayid DECIMAL, patient DECIMAL, room DECIMAL, staystart TIME, stayend TIME)
CREATE TABLE appointment (appointmentid DECIMAL, patient DECIMAL, prepnurse DECIMAL, physician DECIMAL, start TIME, end TIME, examinationroom TEXT)
CREATE TABLE trained_in (physician DECIMAL, treatment DECIMAL, certificationdate TIME, certificationexpires TIME)
CREATE TABLE physician (employeeid DECIMAL, name TEXT, position TEXT, ssn DECIMAL)
CREATE TABLE undergoes (patient DECIMAL, procedures DECIMAL, stay DECIMAL, dateundergoes TIME, physician DECIMAL, assistingnurse DECIMAL)
CREATE TABLE prescribes (physician DECIMAL, patient DECIMAL, medication DECIMAL, date TIME, appointment DECIMAL, dose TEXT)
CREATE TABLE department (departmentid DECIMAL, name TEXT, head DECIMAL)
CREATE TABLE medication (code DECIMAL, name TEXT, brand TEXT, description TEXT)
CREATE TABLE block (blockfloor DECIMAL, blockcode DECIMAL)
CREATE TABLE patient (ssn DECIMAL, name TEXT, address TEXT, phone TEXT, insuranceid DECIMAL, pcp DECIMAL)
CREATE TABLE room (roomnumber DECIMAL, roomtype TEXT, blockfloor DECIMAL, blockcode DECIMAL, unavailable BOOLEAN)
CREATE TABLE affiliated_with (physician DECIMAL, department DECIMAL, primaryaffiliation BOOLEAN)
| How many patients stay in room 112? | SELECT COUNT(patient) FROM stay WHERE room = 112 | SELECT COUNT("patient") FROM "stay" WHERE "room" = 112 | 0.052734 |
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
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 PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
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 PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, 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 PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE 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 SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
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 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)
| Find my comments that contain XYZ. | SELECT C.Id AS "comment_link" FROM Comments AS C WHERE C.UserId = '##UserId##' AND UPPER(C.Text) LIKE UPPER('%##CommentText##%') | SELECT "C"."Id" AS "comment_link" FROM "Comments" AS "C" WHERE "C"."UserId" = '##UserId##' AND UPPER("C"."Text") LIKE UPPER('%##CommentText##%') | 0.140625 |
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 semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE 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 instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
| In the past , who has taught SOC 463 ? | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'SOC' AND course.number = 463 AND NOT (semester.semester = 'WN' AND semester.year = 2016) | SELECT DISTINCT "instructor"."name" FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" JOIN "offering_instructor" ON "course_offering"."offering_id" = "offering_instructor"."offering_id" JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND ("semester"."semester" <> 'WN' OR "semester"."year" <> 2016) JOIN "instructor" ON "instructor"."instructor_id" = "offering_instructor"."instructor_id" WHERE "course"."department" = 'SOC' AND "course"."number" = 463 | 0.509766 |
CREATE TABLE table_65425 ("Rank" FLOAT, "Heat" FLOAT, "Lane" FLOAT, "Nationality" TEXT, "Time" TEXT)
| Which Nationality has a Lane of 5, and a Time of 7:08.04? | SELECT "Nationality" FROM table_65425 WHERE "Lane" = '5' AND "Time" = '7:08.04' | SELECT "Nationality" FROM "table_65425" WHERE "Lane" = '5' AND "Time" = '7:08.04' | 0.079102 |
CREATE TABLE Student_Tests_Taken (registration_id INT, date_test_taken DATETIME, test_result 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 Subjects (subject_id INT, subject_name 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)
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)
| A bar chart about what are the student IDs and middle names of the students enrolled in at most two courses?, and I want to list x-axis in ascending order please. | SELECT T2.middle_name, T1.student_id FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T2.middle_name | SELECT "T2"."middle_name", "T1"."student_id" FROM "Student_Course_Enrolment" AS "T1" JOIN "Students" AS "T2" ON "T1"."student_id" = "T2"."student_id" ORDER BY "T2"."middle_name" NULLS FIRST | 0.18457 |
CREATE TABLE table_14889 ("Place" FLOAT, "Team" TEXT, "Played" FLOAT, "Draw" FLOAT, "Lost" FLOAT, "Goals Scored" FLOAT, "Goals Conceded" FLOAT, "Points" FLOAT)
| Name the total number of places which has played more than 18 | SELECT COUNT("Place") FROM table_14889 WHERE "Played" > '18' | SELECT COUNT("Place") FROM "table_14889" WHERE "Played" > '18' | 0.060547 |
CREATE TABLE table_name_89 (model VARCHAR, released VARCHAR)
| What model was released in 2005? | SELECT model FROM table_name_89 WHERE released = 2005 | SELECT "model" FROM "table_name_89" WHERE "released" = 2005 | 0.057617 |
CREATE TABLE table_25989 ("Player" TEXT, "Games Played" FLOAT, "Minutes" FLOAT, "Field Goals" FLOAT, "Three Pointers" FLOAT, "Free Throws" FLOAT, "Rebounds" FLOAT, "Assists" FLOAT, "Blocks" FLOAT, "Steals" FLOAT, "Points" FLOAT)
| How many steals did jasmine wynne have? | SELECT "Steals" FROM table_25989 WHERE "Player" = 'Jasmine Wynne' | SELECT "Steals" FROM "table_25989" WHERE "Player" = 'Jasmine Wynne' | 0.06543 |
CREATE TABLE table_41298 ("Outcome" TEXT, "Date" TEXT, "Surface" TEXT, "Opponent" TEXT, "Score" TEXT)
| What is the score where the opponent was Mardy Fish? | SELECT "Score" FROM table_41298 WHERE "Opponent" = 'mardy fish' | SELECT "Score" FROM "table_41298" WHERE "Opponent" = 'mardy fish' | 0.063477 |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 50