context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_71535 ( "Name" text, "Country" text, "Status" text, "Transfer window" text, "Transfer fee" text, "Source" text )
What is the source for Laird?
SELECT "Source" FROM table_71535 WHERE "Name" = 'laird'
wikisql
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 te...
give the number of patients whose death status is 1 and given the drug name fentanyl patch.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Fentanyl Patch"
mimicsql_data
CREATE TABLE player ( player_id number, name text, position text, club_id number, apps number, tries number, goals text, points number ) CREATE TABLE club ( club_id number, name text, region text, start_year text ) CREATE TABLE competition ( competition_id number, ...
which country did participated in the most number of Tournament competitions?
SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1
spider
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 gsi ( course_offering_id int, student_id int ) CREATE TABLE semester ( ...
In order to declare a major in ANTHRCUL , what classes must I take ?
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%ANTHRCUL%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id
advising
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE flight_s...
what flights are there tuesday morning from DALLAS to ATLANTA
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 22 AND date_day.month_number = 3 AND ...
atis
CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Description VARCHAR(255) ) CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_From DATETIME, Date_in_Locaton_To DATETIME ) CREATE TABLE Ref_Document_Types ...
Show all calendar dates and day Numbers. Plot them as line chart.
SELECT Calendar_Date, Day_Number FROM Ref_Calendar
nvbench
CREATE TABLE table_19817 ( "Ido" text, "English" text, "Italian" text, "French" text, "German" text, "Russian" text, "Spanish" text )
What is the French word where the German word is filtern?
SELECT "French" FROM table_19817 WHERE "German" = 'filtern'
wikisql
CREATE TABLE table_name_13 ( attendance INTEGER, score VARCHAR, points VARCHAR )
Which Attendance has a Score of 4 3, and Points smaller than 5?
SELECT MAX(attendance) FROM table_name_13 WHERE score = "4–3" AND points < 5
sql_create_context
CREATE TABLE table_203_440 ( id number, "rank" number, "player" text, "from" text, "to" text, "transfer fee\n(\u20ac million)" number, "year" number )
how many players were transferred after the year 2000 ?
SELECT COUNT("player") FROM table_203_440 WHERE "year" > 2000
squall
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
能提供出门诊就诊45399366381的日期是多少吗?
SELECT JZKSRQ FROM mzjzjlb WHERE JZLSH = '45399366381'
css
CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, stud...
Return a bar chart about the distribution of login_name and author_tutor_ATB .
SELECT login_name, author_tutor_ATB FROM Course_Authors_and_Tutors ORDER BY personal_name
nvbench
CREATE TABLE hosting_city ( year number, match_id number, host_city text ) CREATE TABLE temperature ( city_id number, jan number, feb number, mar number, apr number, jun number, jul number, aug number, sep number, oct number, nov number, dec number ) CREATE ...
Which cities served as a host city after 2010?
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010
spider
CREATE TABLE table_50125 ( "Award" text, "Year" real, "Category" text, "Work" text, "Result" text )
what is the work when the result is won and the year is after 2002?
SELECT "Work" FROM table_50125 WHERE "Result" = 'won' AND "Year" > '2002'
wikisql
CREATE TABLE table_24074 ( "Episode" text, "Broadcast date" text, "Run time" text, "Viewers (in millions)" text, "Archive" text )
On broadcast date is 28march1970, how many people tuned in?
SELECT "Viewers (in millions)" FROM table_24074 WHERE "Broadcast date" = '28March1970'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, ...
what was the name of the medicine that was prescribed to patient 025-53538 during the previous month for the last time?
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-53538')) AND DATETIME(medication.drugstarttime, 'start of month...
eicu
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
select comments with exact same text , with text like, and count > 2.
SELECT cc.Id AS "comment_link" FROM Comments AS cc WHERE cc.Text IN (SELECT c.Text FROM Comments AS c WHERE c.Text LIKE '%##Text##%' COLLATE SQL_Latin1_General_CP1_CI_AS GROUP BY c.Text HAVING COUNT(c.Id) > 2 LIMIT 35) AND cc.CreationDate > '2015-05-22T00:00:00.000'
sede
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 te...
Show the number of patients who are less than 60 years of age and have the drug code morp2i.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "62" AND prescriptions.formulary_drug_cd = "MORP2I"
mimicsql_data
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
患者云意致在二00一年六月久日到二0一七年十二月十三日期间,总共去过几家医院
SELECT COUNT(gwyjzb.MED_SER_ORG_NO) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '云意致' AND gwyjzb.IN_HOSP_DATE BETWEEN '2001-06-09' AND '2017-12-13' UNION SELECT COUNT(fgwyjzb.MED_SER_ORG_NO) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '云意致' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2001-06-09' AND '2017-12-13'
css
CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE employee ( eid number, name text, salary number ) CREATE TABLE aircraft ( aid number, name text, di...
What are the names of the aircraft that the least people are certified to fly?
SELECT T2.name FROM certificate AS T1 JOIN aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewRejectionReasons ( Id number, Na...
Highest viewcounts for bountied questions.
SELECT SUM(v.BountyAmount) AS "total_bounties", COUNT(v.BountyAmount) AS "bounties_count", p.Id AS "post_link", p.ViewCount FROM Posts AS p JOIN Votes AS v ON v.PostId = p.Id WHERE v.VoteTypeId = 8 GROUP BY p.Id, p.ViewCount ORDER BY p.ViewCount DESC
sede
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, ...
for the patients with 30s , what is the top three most frequent diagnosis for the patients?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN...
mimic_iii
CREATE TABLE table_name_38 ( winner VARCHAR, circuit VARCHAR )
Who was the winner on the Amaroo Park circuit?
SELECT winner FROM table_name_38 WHERE circuit = "amaroo park"
sql_create_context
CREATE TABLE Street_Markets ( Market_ID INTEGER, Market_Details VARCHAR(255) ) CREATE TABLE Features ( Feature_ID INTEGER, Feature_Details VARCHAR(255) ) CREATE TABLE Tourist_Attraction_Features ( Tourist_Attraction_ID INTEGER, Feature_ID INTEGER ) CREATE TABLE Tourist_Attractions ( Touri...
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods Visualize by bar chart, and could you order y axis from low to high order?
SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*)
nvbench
CREATE TABLE table_24415 ( "Satellite" text, "Launch date (UTC)" text, "Decay" text, "Mass(kg)" text, "Diameter(m)" text, "NSSDC ID" text, "Nation" text, "Usage" text )
What is the decay for the sattelite with an id that is 1990-081c?
SELECT "Decay" FROM table_24415 WHERE "NSSDC ID" = '1990-081C'
wikisql
CREATE TABLE table_name_31 ( captain VARCHAR, manager VARCHAR )
Which captain is managed by gianluca vialli?
SELECT captain FROM table_name_31 WHERE manager = "gianluca vialli"
sql_create_context
CREATE TABLE table_43695 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/junior/club team (league)" text )
WHAT IS THE POSITION OF FRANCE?
SELECT "Position" FROM table_43695 WHERE "Nationality" = 'france'
wikisql
CREATE TABLE table_90 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
How many episodes in season 6 titles 'Poppin' Tags'?
SELECT COUNT("No. in season") FROM table_90 WHERE "Title" = 'Poppin'' Tags'
wikisql
CREATE TABLE table_name_38 ( score VARCHAR, team VARCHAR )
Which score is the Seattle team?
SELECT score FROM table_name_38 WHERE team = "seattle"
sql_create_context
CREATE TABLE constructorStandings ( constructorStandingsId INTEGER, raceId INTEGER, constructorId INTEGER, points REAL, position INTEGER, positionText TEXT, wins INTEGER ) CREATE TABLE status ( statusId INTEGER, status TEXT ) CREATE TABLE qualifying ( qualifyId INTEGER, rac...
How many races are held in each year after 2014? Show me a bar chart, and rank in desc by the bar please.
SELECT year, COUNT(year) FROM races AS T1 JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.year > 2014 GROUP BY year ORDER BY year DESC
nvbench
CREATE TABLE table_name_12 ( grid INTEGER, time_retired VARCHAR, laps VARCHAR )
What is the total grid number where the time/retired is +58.182 and the lap number is less than 67?
SELECT SUM(grid) FROM table_name_12 WHERE time_retired = "+58.182" AND laps < 67
sql_create_context
CREATE TABLE table_73381 ( "Round" real, "Circuit" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Team" text )
What was the earlier round where Takashi Kogure got the fastest lap?
SELECT MIN("Round") FROM table_73381 WHERE "Fastest Lap" = 'Takashi Kogure'
wikisql
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 ) ...
what is minimum age of patients whose primary disease is bladder cancer/sda and admission year is greater than or equal to 2107?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA" AND demographic.admityear >= "2107"
mimicsql_data
CREATE TABLE table_name_59 ( margin_of_victory VARCHAR, winning_score VARCHAR )
What was the margin of victory when the winning score was 14 (70-68-67=205)?
SELECT margin_of_victory FROM table_name_59 WHERE winning_score = –14(70 - 68 - 67 = 205)
sql_create_context
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, U...
Dropping fast: Lowest question score per thousand views among questions with score -5 or worse.
SELECT Posts.Id AS "post_link", Posts.OwnerUserId AS "user_link", Score, ViewCount, Score * 1000 / ViewCount AS "Score per Thousand Views" FROM Posts WHERE Score <= -5 AND PostTypeId = 1 ORDER BY Score * 1000 / ViewCount LIMIT 1000
sede
CREATE TABLE table_1359212_2 ( margin VARCHAR, second_place VARCHAR, language VARCHAR )
what amount has spain as second place and the language is russian?
SELECT COUNT(margin) FROM table_1359212_2 WHERE second_place = "Spain" AND language = "Russian"
sql_create_context
CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_n...
how many french restaurant are there in palo alto ?
SELECT COUNT(*) FROM location, restaurant WHERE location.city_name = 'palo alto' AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id
restaurants
CREATE TABLE table_73015 ( "Year" real, "Illinois" text, "Indiana" text, "Kentucky" text, "Michigan" text, "Ohio" text, "Wisconsin" text )
What was the little league team from Michigan when the little league team from Indiana was Terre Haute North LL Terre Haute?
SELECT "Michigan" FROM table_73015 WHERE "Indiana" = 'Terre Haute North LL Terre Haute'
wikisql
CREATE TABLE table_64679 ( "World record" text, "Snatch" text, "Akakios Kakiasvilis ( GRE )" text, "188kg" text, "Athens , Greece" text )
For what 188kg is the world record clean & jerk?
SELECT "188kg" FROM table_64679 WHERE "World record" = 'clean & jerk'
wikisql
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
count the numbers of patients who died after having been diagnosed with int inf clstrdium dfcile during the same hospital encounter in 2101.
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FRO...
mimic_iii
CREATE TABLE table_name_65 ( attendance VARCHAR, tie_no VARCHAR )
How many attended the game when the score was tie at 4?
SELECT attendance FROM table_name_65 WHERE tie_no = "4"
sql_create_context
CREATE TABLE table_25999087_2 ( young_rider_classification VARCHAR, winner VARCHAR )
Who is every young rider classification when Jelle Vanendert is the winner?
SELECT young_rider_classification FROM table_25999087_2 WHERE winner = "Jelle Vanendert"
sql_create_context
CREATE TABLE table_name_99 ( score VARCHAR, country VARCHAR )
Name the score for fiji
SELECT score FROM table_name_99 WHERE country = "fiji"
sql_create_context
CREATE TABLE table_73186 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
Which player is on the BC Lions?
SELECT "Player" FROM table_73186 WHERE "CFL Team" = 'BC Lions'
wikisql
CREATE TABLE table_12026 ( "Round" real, "Pick" real, "Name" text, "Position" text, "School" text )
What position does the player from texas a&m play?
SELECT "Position" FROM table_12026 WHERE "School" = 'texas a&m'
wikisql
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, ...
What is the procedure icd9 code and procedure long title of Jonathan Wiggins?
SELECT procedures.icd9_code, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Jonathan Wiggins"
mimicsql_data
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 ) ...
What is the number of emergency hospital admitted patients who take sodium polystyrene sulfonate?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Sodium Polystyrene Sulfonate"
mimicsql_data
CREATE TABLE table_name_1 ( legs_lost VARCHAR, high_checkout VARCHAR, played VARCHAR )
What is the total number of legs lost of the player with a high checkout less than 76 and less than 3 played?
SELECT COUNT(legs_lost) FROM table_name_1 WHERE high_checkout < 76 AND played < 3
sql_create_context
CREATE TABLE table_name_42 ( player VARCHAR, score VARCHAR )
What is Player, when Score is '71-69-72-72=284'?
SELECT player FROM table_name_42 WHERE score = 71 - 69 - 72 - 72 = 284
sql_create_context
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 te...
How many of the patients on elective admission were born before the year 2094?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.dob_year < "2094"
mimicsql_data
CREATE TABLE table_55297 ( "Nation" text, "Gold" text, "Silver" text, "Bronze" text, "Total" real )
Which nation won 1 gold medal and 1 bronze, for a total of 2 medals?
SELECT "Nation" FROM table_55297 WHERE "Gold" = '1' AND "Bronze" = '1' AND "Total" = '2'
wikisql
CREATE TABLE table_12127 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text )
On 24/11/1979, what is the opposing teams?
SELECT "Opposing Teams" FROM table_12127 WHERE "Date" = '24/11/1979'
wikisql
CREATE TABLE table_19666 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
Name the year for victoria hristova neli nedialkova
SELECT "Year" FROM table_19666 WHERE "Womens doubles" = 'Victoria Hristova Neli Nedialkova'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TAB...
count the number of patients who were diagnosed with intracranial injury - with concussion until 2104 and did not return to the hospital within the same month.
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'intracranial injury - with concussion' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1)...
eicu
CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, party number, first_elected number, committee text ) CREATE TABLE party ( party_id number, year number, party text, governor text, lieutenant_governor text, comptro...
Which parties have delegates in both the 'Appropriations' committee and the 'Economic Matters' committee?
SELECT T2.party FROM election AS T1 JOIN party AS T2 ON T1.party = T2.party_id WHERE T1.committee = "Appropriations" INTERSECT SELECT T2.party FROM election AS T1 JOIN party AS T2 ON T1.party = T2.party_id WHERE T1.committee = "Economic Matters"
spider
CREATE TABLE table_51688 ( "Player" text, "No.(s)" text, "Height in Ft." text, "Position" text, "Years for Rockets" text, "School/Club Team/Country" text )
What position does the player who is 6-10 play?
SELECT "Position" FROM table_51688 WHERE "Height in Ft." = '6-10'
wikisql
CREATE TABLE table_name_64 ( bronze INTEGER, nation VARCHAR, total VARCHAR )
What's the bronze count for South Africa (RSA) with a total more than 16?
SELECT MAX(bronze) FROM table_name_64 WHERE nation = "south africa (rsa)" AND total > 16
sql_create_context
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
what is your cheapest flight from PITTSBURGH to DENVER
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CIT...
atis
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
住院的病人64067392634其中医诊断的编号以及名称分别是什么啊?
SELECT wdmzjzjlb.ZYZYZDZZBM, wdmzjzjlb.ZYZYZDZZMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '64067392634' UNION SELECT bdmzjzjlb.ZYZYZDZZBM, bdmzjzjlb.ZYZYZDZZMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '64067392634'
css
CREATE TABLE table_29412 ( "Athlete" text, "Event" text, "Round of 32" text, "Round of 16" text, "Quarterfinals" text, "Semifinals" text )
What is the round of 32 if the round of 16 is drenovak ( srb ) w 20 11?
SELECT "Round of 32" FROM table_29412 WHERE "Round of 16" = 'Drenovak ( SRB ) W 20–11'
wikisql
CREATE TABLE table_54331 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
what is the grid when the time/retired is +9 laps and the laps is larger than 91?
SELECT COUNT("Grid") FROM table_54331 WHERE "Time/Retired" = '+9 laps' AND "Laps" > '91'
wikisql
CREATE TABLE table_66751 ( "Season" text, "Champion" text, "Runner Up" text, "Israel Bowl" text, "Venue" text, "Date" text, "Finals MVP" text )
Name the season for runner up of judean rebels
SELECT "Season" FROM table_66751 WHERE "Runner Up" = 'judean rebels'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
在医院2068001患者62939084入院诊断疾病名称包含沙眼的医疗就诊记录编号是什么?
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '62939084' AND MED_SER_ORG_NO = '2068001' AND IN_DIAG_DIS_NM LIKE '%沙眼%'
css
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 t...
what is the number of patients whose age is less than 20 and days of hospital stay is greater than 14?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "20" AND demographic.days_stay > "14"
mimicsql_data
CREATE TABLE table_name_6 ( season VARCHAR, rating VARCHAR )
Which season was one of the players rated +98?
SELECT season FROM table_name_6 WHERE rating = "+98"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, ...
列出在医院5644576中患者张曼蔓不包含口腔的就诊科室名称所有门诊就诊记录的流水号是什么?
SELECT txmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '张曼蔓' AND hz_info.YLJGDM = '5644576' AND NOT txmzjzjlb.JZKSMC LIKE '%口腔%' UNION SELECT ftxmzjz...
css
CREATE TABLE Team ( id INTEGER, team_api_id INTEGER, team_fifa_api_id INTEGER, team_long_name TEXT, team_short_name TEXT ) CREATE TABLE sqlite_sequence ( name any, seq any ) CREATE TABLE Player ( id INTEGER, player_api_id INTEGER, player_name TEXT, player_fifa_api_id INTEGE...
, show preferred_foot in descending order.
SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot ORDER BY preferred_foot DESC
nvbench
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
把科室6118从一0年二月五日到一九年十二月三日因疾病W66.043需要住院治疗的平均费用查看一下
SELECT AVG(MED_AMOUT) FROM t_kc21 WHERE MED_ORG_DEPT_CD = '6118' AND IN_HOSP_DATE BETWEEN '2010-02-05' AND '2019-12-03' AND IN_DIAG_DIS_CD = 'W66.043' AND CLINIC_TYPE = '住院'
css
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 t...
how many patients were admitted to the hospital before the year 2175 with a procedure long title insertion of two vascular stents?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2175" AND procedures.long_title = "Insertion of two vascular stents"
mimicsql_data
CREATE TABLE gwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
号码33992574为团队成员最常开的药品排序是什么样的?
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '33992574' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLIN...
css
CREATE TABLE table_53900 ( "Player" text, "Dates of captaincy" text, "Lost" real, "Tied" real, "No result" real, "% win [A ]" real )
Which player has no 0 results and multiples ties?
SELECT "Player" FROM table_53900 WHERE "No result" = '0' AND "Tied" > '0'
wikisql
CREATE TABLE table_23667534_1 ( album_s_ VARCHAR, song_s__title VARCHAR )
What album was the song My Chariot on?
SELECT album_s_ FROM table_23667534_1 WHERE song_s__title = "My Chariot"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, H...
花费的医疗费总额不少于1973.76元的次数在患者72169223的医疗记录有多少,其有什么编号的病是入院诊断出来的,叫啥名?
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '72169223' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 1973.76)
css
CREATE TABLE table_203_16 ( id number, "name" text, "took office" text, "left office" text, "party" text, "district residence" text, "notes" text )
who was the next representative to be elected after carl albert ?
SELECT "name" FROM table_203_16 WHERE id > (SELECT id FROM table_203_16 WHERE "name" = 'carl albert') LIMIT 1
squall
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) ...
what were the hospital hospital admission times of patient 015-60616?
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '015-60616'
eicu
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, Revision...
Most score on security tag answers.
SELECT q.Id AS "qid", q.Title AS "title", q.Score AS "qscore", q.ViewCount AS "qviewcount", q.Tags AS "tags", q.LastActivityDate AS "qdate", q.Body AS "question", a.Id AS "aid", a.Body AS "answer", a.ViewCount AS "aviewcount", a.Score AS "ascore", a.LastActivityDate AS "adate", a.CommentCount AS "acommentcount", u.Id A...
sede
CREATE TABLE table_22712 ( "Period" text, "Live births per year" text, "Deaths per year" text, "Natural change per year" text, "CBR*" text, "CDR*" text, "NC*" text, "TFR*" text, "IMR*" real, "Life expectancy total" text, "Life expectancy males" text, "Life expectancy fema...
What's the TFR for the period with NC of 13.4?
SELECT "TFR*" FROM table_22712 WHERE "NC*" = '13.4'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
患者对应的门诊就诊中开出的检验报告单80578545144上的姓名是什么?
SELECT person_info.XM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE jybgb.BGDH = '8...
css
CREATE TABLE table_39621 ( "School" text, "Mascot" text, "Location" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "# / County" text )
What's the enrollment at 41 Johnson?
SELECT AVG("Enrollment") FROM table_39621 WHERE "# / County" = '41 johnson'
wikisql
CREATE TABLE table_name_22 ( date VARCHAR, week VARCHAR )
On which date was the game played on Week 13?
SELECT date FROM table_name_22 WHERE week = 13
sql_create_context
CREATE TABLE zzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
患者苏晓莉检验下肢的各项指标结果如何?
SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy...
css
CREATE TABLE table_73576 ( "No" real, "Player" text, "Height (m)" text, "Height (f)" text, "Position" text, "Year born" real, "Current Club" text )
Name the height for the player born in 1981
SELECT "Height (m)" FROM table_73576 WHERE "Year born" = '1981'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
count the number of patients taking main type drug prescription who have diagnoses icd9 code 43820.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "43820" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_name_40 ( attendance INTEGER, record VARCHAR, date VARCHAR )
What is the attendance sum of the game on March 16, 1990 with a loss record?
SELECT SUM(attendance) FROM table_name_40 WHERE record = "loss" AND date = "march 16, 1990"
sql_create_context
CREATE TABLE table_203_203 ( id number, "year" number, "majors" number, "atp wins" number, "total wins" number, "earnings (us$)" number, "money list rank" number )
in which year was only top ten ranking in monetary earnings recorded ?
SELECT "year" FROM table_203_203 WHERE "money list rank" <= 10
squall
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
what is diagnoses short title of subject name paul edwards?
SELECT diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Paul Edwards"
mimicsql_data
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 ) ...
provide the number of patients whose admission year is less than 2170 and procedure long title is percutaneous [endoscopic] gastrojejunostomy?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2170" AND procedures.long_title = "Percutaneous [endoscopic] gastrojejunostomy"
mimicsql_data
CREATE TABLE table_20590020_2 ( best_finish VARCHAR, money_list_rank VARCHAR )
What is the total number of players who had a money list rank of 96?
SELECT COUNT(best_finish) FROM table_20590020_2 WHERE money_list_rank = 96
sql_create_context
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
% of questions that were the user's only question.
SELECT SUM(CASE WHEN sq.count = 1 OR sq.OwnerUserId IS NULL THEN 1 ELSE 0 END) * 1.0 / SUM(count), SUM(CASE WHEN sq.count = 1 OR sq.OwnerUserId IS NULL THEN 1 ELSE 0 END), SUM(count) FROM (SELECT OwnerUserId, COUNT(*) AS count FROM Posts WHERE PostTypeId = 1 GROUP BY OwnerUserId) AS sq
sede
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
count the number of patients whose insurance is private and diagnosis long title is fever presenting with conditions classified elsewhere.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Private" AND diagnoses.long_title = "Fever presenting with conditions classified elsewhere"
mimicsql_data
CREATE TABLE table_204_840 ( id number, "no. in\nseries" number, "no. in\nseason" number, "title" text, "directed by" text, "written by" text, "original air date" text, "prod. code" text )
how many episodes aired in may 1997 ?
SELECT COUNT(*) FROM table_204_840 WHERE "original air date" = 5 AND "original air date" = 1997
squall
CREATE TABLE table_65290 ( "Lok Sabha" text, "Duration" text, "Name of M.P." text, "Party Affiliation" text, "Election Year" real )
What is the duration when Lok Sabha shows fifth?
SELECT "Duration" FROM table_65290 WHERE "Lok Sabha" = 'fifth'
wikisql
CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE employee ( eid number, name text, salary number ) CREATE TABLE certificate ( eid number, aid number ) ...
Show the id and name of the employee with maximum salary.
SELECT eid, name FROM employee ORDER BY salary DESC LIMIT 1
spider
CREATE TABLE table_23548160_1 ( constructor VARCHAR, year VARCHAR )
What was the constructor in 1975?
SELECT constructor FROM table_23548160_1 WHERE year = 1975
sql_create_context
CREATE TABLE table_name_25 ( points VARCHAR, goals_conceded VARCHAR, place VARCHAR )
How many points did the team have that conceded 41 goals and finish in a place larger than 10?
SELECT COUNT(points) FROM table_name_25 WHERE goals_conceded = 41 AND place > 10
sql_create_context
CREATE TABLE Ref_Attraction_Types ( Attraction_Type_Description VARCHAR, Attraction_Type_Code VARCHAR ) CREATE TABLE Tourist_Attractions ( Attraction_Type_Code VARCHAR )
Show the description and code of the attraction type most tourist attractions belong to.
SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE table_name_17 ( Id VARCHAR )
What is the 1986 value with A in 1991 and A in 1987?
SELECT 1986 FROM table_name_17 WHERE 1991 = "a" AND 1987 = "a"
sql_create_context
CREATE TABLE table_13099 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the sum of sliver medals when there were 2 gold medals, less than 15 total medals, and the rank is greater than 5?
SELECT SUM("Silver") FROM table_13099 WHERE "Gold" = '2' AND "Total" < '15' AND "Rank" > '5'
wikisql
CREATE TABLE table_8248 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
what is the sum of total when year(s) won is 1985?
SELECT SUM("Total") FROM table_8248 WHERE "Year(s) won" = '1985'
wikisql
CREATE TABLE table_52910 ( "Name" text, "Height" text, "Weight" text, "Spike" text, "2008 club" text )
Name the height for 2008 club of trentino volley
SELECT "Height" FROM table_52910 WHERE "2008 club" = 'trentino volley'
wikisql
CREATE TABLE table_79063 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Streak" text )
Who was the opponent for game 75?
SELECT "Opponent" FROM table_79063 WHERE "Game" = '75'
wikisql