context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagn...
what is the average total cost of a hospital visit that includes embolectomy since 4 years ago?
SELECT AVG(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 treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'embolectomy')) AND DATETIME(cost.chargetime)...
eicu
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, ...
2004-04-06到2016-04-25,6607183医院内有多少科室在门诊就诊中开出的检验报告单不多于13张
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_inf...
css
CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABL...
who published the most in semantic parsing after 2005 ?
SELECT DISTINCT COUNT(paper.paperid), writes.authorid FROM keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year > 2005 AND writes.paperid = paper.paperid GROUP BY write...
scholar
CREATE TABLE table_52286 ( "Race" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Race Winner" text, "Constructor" text, "Report" text )
Who had the fastest lap in the Monaco Grand Prix?
SELECT "Fastest Lap" FROM table_52286 WHERE "Race" = 'monaco grand prix'
wikisql
CREATE TABLE table_47108 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text )
What is the played number when the tries against shows correct as of 18:13 26 May 2008?
SELECT "Played" FROM table_47108 WHERE "Tries against" = 'correct as of 18:13 26 may 2008'
wikisql
CREATE TABLE table_name_39 ( start VARCHAR, finish VARCHAR )
Name the start for finish being 21st
SELECT start FROM table_name_39 WHERE finish = "21st"
sql_create_context
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 ) C...
get the number of male patients who have white-russian ethnic background.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.ethnicity = "WHITE - RUSSIAN"
mimicsql_data
CREATE TABLE table_19044 ( "Grand Cru" text, "Region" text, "Village" text, "Wine style" text, "Vineyard surface (2010)" text )
what's the vineyard surface (2010) with grand cru being bienvenues-b tard-montrachet
SELECT "Vineyard surface (2010)" FROM table_19044 WHERE "Grand Cru" = 'Bienvenues-Bâtard-Montrachet'
wikisql
CREATE TABLE table_name_79 ( flap VARCHAR, race VARCHAR, pole VARCHAR, podium VARCHAR )
When the pole is larger than 0 and the podium is less than 44, with a race number less than 16, what is the FLap?
SELECT flap FROM table_name_79 WHERE pole > 0 AND podium < 44 AND race < 16
sql_create_context
CREATE TABLE table_name_26 ( country VARCHAR, player VARCHAR )
What country does Greg Norman represent?
SELECT country FROM table_name_26 WHERE player = "greg norman"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
count the number of patients whose diagnoses short title is accident in place nec and drug route is sl?
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.short_title = "Accident in place NEC" AND prescriptions.route = "SL"
mimicsql_data
CREATE TABLE table_name_66 ( sixth VARCHAR, second VARCHAR )
WHAT IS THE SIXTH WITH A SECOND OF WHITE LIES?
SELECT sixth FROM table_name_66 WHERE second = "white lies"
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, give me the comparison about the average of price over the name , and group by attribute name by a bar chart, and sort from low to high by the bar.
SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name
nvbench
CREATE TABLE table_name_79 ( venue VARCHAR, radio VARCHAR, race VARCHAR )
What is the venue of the napa auto parts 200 race with a mrn radio?
SELECT venue FROM table_name_79 WHERE radio = "mrn" AND race = "napa auto parts 200"
sql_create_context
CREATE TABLE table_48251 ( "Country" text, "Preliminary" real, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real )
What is the name of the country with less than 9.033 for swimsuit, 8.611 for interview and preliminary is less than 8.87?
SELECT "Country" FROM table_48251 WHERE "Swimsuit" < '9.033' AND "Interview" = '8.611' AND "Preliminary" < '8.87'
wikisql
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 the least expensive airfare between BOSTON and BALTIMORE
SELECT DISTINCT fare.fare_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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE table_name_84 ( city VARCHAR, july__avg_high_°f_ VARCHAR, january__avg_low_°f_ VARCHAR )
What city had a july high below 84, and a january low of 34.3?
SELECT city FROM table_name_84 WHERE july__avg_high_°f_ < 84 AND january__avg_low_°f_ = "34.3"
sql_create_context
CREATE TABLE table_21695 ( "Winner" text, "Country" text, "Winter Olympics" text, "FIS Nordic World Ski Championships" text, "Holmenkollen" text )
What is the holmenkollen for the 1982 FIS Nordic World Ski Championships?
SELECT "Holmenkollen" FROM table_21695 WHERE "FIS Nordic World Ski Championships" = '1982'
wikisql
CREATE TABLE table_71058 ( "Year" real, "Population (Total)" real, "(Caboolture)" real, "(Pine Rivers)" real, "(Redcliffe)" real )
What is the average Caboolture population with a Redcliffe population greater than 27,327, a Pine Rivers population greater than 119,236, and a total population greater than 344,878 after 1971?
SELECT AVG("(Caboolture)") FROM table_71058 WHERE "(Redcliffe)" > '27,327' AND "(Pine Rivers)" > '119,236' AND "Year" > '1971' AND "Population (Total)" > '344,878'
wikisql
CREATE TABLE table_58103 ( "Year" real, "Driver" text, "Constructor" text, "Location" text, "Report" text )
What was the constructor of the car that Achille Varzi drove before 1937?
SELECT "Constructor" FROM table_58103 WHERE "Year" < '1937' AND "Driver" = 'achille varzi'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
what is admission time of subject name herlinda thomson?
SELECT demographic.admittime FROM demographic WHERE demographic.name = "Herlinda Thomson"
mimicsql_data
CREATE TABLE election ( Date VARCHAR, Representative_ID VARCHAR ) CREATE TABLE representative ( Name VARCHAR, Representative_ID VARCHAR )
What are the names of representatives and the dates of elections they participated in.
SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID
sql_create_context
CREATE TABLE table_54862 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
What School did Player Billy Owens attend?
SELECT "School" FROM table_54862 WHERE "Player" = 'billy owens'
wikisql
CREATE TABLE table_18344 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
In which district is the incumbent John Breaux?
SELECT "District" FROM table_18344 WHERE "Incumbent" = 'John Breaux'
wikisql
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number...
Number of votes in the last year.
SELECT COUNT(*) FROM Votes WHERE CreationDate > DATEADD(year, -1, GETDATE()) AND UserId > -1
sede
CREATE TABLE media_types ( id INTEGER, name VARCHAR(120) ) CREATE TABLE sqlite_sequence ( name any, seq any ) CREATE TABLE invoice_lines ( id INTEGER, invoice_id INTEGER, track_id INTEGER, unit_price NUMERIC(10,2), quantity INTEGER ) CREATE TABLE playlist_tracks ( playlist_id ...
Bar chart x axis name y axis how many name, list in desc by the names.
SELECT name, COUNT(name) FROM playlists GROUP BY name ORDER BY name DESC
nvbench
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
Are there any morning CHEM 521 classes ?
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'CHEM' AND course.number = 521 AND semester.semester = 'WN' AND semester.semester_id = course_off...
advising
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...
what is the minimum total hospital cost that includes the calcium during the 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 lab.patientunitstayid FROM lab WHERE lab.labname = 'calcium')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME...
eicu
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
count the number of patients whose diagnoses long title is venous (peripheral) insufficiency, unspecified and drug route is iv?
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.long_title = "Venous (peripheral) insufficiency, unspecified" AND prescriptions.route = "IV"
mimicsql_data
CREATE TABLE table_204_232 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
other nation to earn no bronze medals besides peru
SELECT "nation" FROM table_204_232 WHERE "nation" <> 'peru' AND "bronze" = 0
squall
CREATE TABLE table_67754 ( "Name" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real )
What is the grid associated with a Time/Retired of + 1 lap, and under 7 points?
SELECT MIN("Grid") FROM table_67754 WHERE "Time/Retired" = '+ 1 lap' AND "Points" < '7'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication (...
how much does it cost to get checked for central diabetes insipidus - from trauma?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'central diabetes insipidus - from trauma')
eicu
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC...
有几个科室在2005年4月9日到2021年12月15日内医院6945213在门诊就诊中开出不少于3张检验报告单?
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '6945213' AND jybgb.BGRQ BETWEEN '2005-04-09' AND '2021-12-15' GROUP BY jybgb.KSBM HAVING COUNT(*) >= 3) AS T
css
CREATE TABLE table_24575253_4 ( division_four VARCHAR, division_five VARCHAR )
When godstone is in division five who is in division four?
SELECT division_four FROM table_24575253_4 WHERE division_five = "Godstone"
sql_create_context
CREATE TABLE storm ( storm_id number, name text, dates_active text, max_speed number, damage_millions_usd number, number_deaths number ) CREATE TABLE affected_region ( region_id number, storm_id number, number_city_affected number ) CREATE TABLE region ( region_id number, r...
Show storm name with at least two regions and 10 cities affected.
SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10
spider
CREATE TABLE table_204_115 ( id number, "year" number, "track" text, "number" number, "team" text, "car" text, "round result" text )
how many times was the round result higher than 11th ?
SELECT COUNT(*) FROM table_204_115 WHERE "round result" < 11
squall
CREATE TABLE table_name_20 ( television_service VARCHAR, language VARCHAR, package_option VARCHAR )
What television service has italian as the language, and sky famiglia as the package option?
SELECT television_service FROM table_name_20 WHERE language = "italian" AND package_option = "sky famiglia"
sql_create_context
CREATE TABLE table_name_58 ( established VARCHAR, league VARCHAR, championships VARCHAR )
What is the Established date of the Ontario Provincial Junior A Hockey League with more than 1 Championship?
SELECT COUNT(established) FROM table_name_58 WHERE league = "ontario provincial junior a hockey" AND championships > 1
sql_create_context
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...
Calculate the average age of male patients who have sternal wound infection as their primary disease.
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "STERNAL WOUND INFECTION"
mimicsql_data
CREATE TABLE table_name_93 ( number_of_electorates__2009_ VARCHAR, constituency_number VARCHAR )
Which Number of electorates (2009) has 188 Constituents?
SELECT number_of_electorates__2009_ FROM table_name_93 WHERE constituency_number = "188"
sql_create_context
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
列出在医院0345841中患者吕香馨不包含室的就诊科室名称所有门诊就诊记录的流水号是什么?
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '吕香馨' AND hz_info.YLJGDM = '0345841' AND NOT mzjzjlb.JZKSMC LIKE '%室%'
css
CREATE TABLE table_name_82 ( year INTEGER, best_finish VARCHAR )
what is the earliest year with the best finish t-65?
SELECT MIN(year) FROM table_name_82 WHERE best_finish = "t-65"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGu...
Get counts of post feedback votes.
SELECT CASE IsAnonymous WHEN 1 THEN 'Yes' ELSE 'No' END AS "anonymous?", CASE VoteTypeId WHEN 2 THEN 'Upvotes' ELSE 'Downvotes' END AS "votes_type", COUNT(Id) AS "total_votes" FROM PostFeedback GROUP BY IsAnonymous, VoteTypeId
sede
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, ...
is there any organisms found in patient 65741's last sputum test since 2105?
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65741) AND microbiologyevents.spec_type_desc = 'sputum' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y', microbiologyevents.charttime) >= '2105' ORDER BY...
mimic_iii
CREATE TABLE table_41654 ( "Name" text, "Height" text, "Weight (lbs.)" real, "Position" text, "Class" text, "Hometown" text )
What is the sum of Weight for the person with a height of 6'6'?
SELECT SUM("Weight (lbs.)") FROM table_41654 WHERE "Height" = '6''6'
wikisql
CREATE TABLE table_name_91 ( to_par VARCHAR, score VARCHAR )
What is the to par for the player who scored 73-68=141?
SELECT to_par FROM table_name_91 WHERE score = 73 - 68 = 141
sql_create_context
CREATE TABLE table_204_325 ( id number, "class" text, "name" text, "company" text, "residence" text, "term expires dec 31" number, "notes" text )
which other people are in class c besides rose washington ?
SELECT "name" FROM table_204_325 WHERE "name" <> 'rose washington' AND "class" = 'c'
squall
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 age is less than 43 and lab test fluid is other body fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "43" AND lab.fluid = "Other Body Fluid"
mimicsql_data
CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_number varchar(7), time_slot_id varchar(...
Bar chart of minimal salary from each dept name, and list by the total number in descending.
SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY MIN(salary) DESC
nvbench
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
what is admission time of subject id 94762?
SELECT demographic.admittime FROM demographic WHERE demographic.subject_id = "94762"
mimicsql_data
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_items (...
what are the three most commonly ordered procedures for patients who had previously received temporary tracheostomy within the same month, until 3 years ago?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi...
mimic_iii
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the amount of job_id , and group by attribute job_id.
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID
nvbench
CREATE TABLE table_148386_2 ( role VARCHAR, casino_theatre_1888 VARCHAR )
How many roles include George Broderick in the casino 1888 theater?
SELECT role FROM table_148386_2 WHERE casino_theatre_1888 = "George Broderick"
sql_create_context
CREATE TABLE ftxmzjzjlb ( 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, MZZYZD...
门诊诊断为病人患有疾病A73.395的的相应人数以及籍贯代码、名称分别是多少?
SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) 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 txmzjzjlb.JZZDBM = 'A73.395' GROUP BY person_info.JGDM UNION SELECT...
css
CREATE TABLE table_name_54 ( league VARCHAR, year VARCHAR, canada___usa_rank VARCHAR )
After the year 2011, when the Canada - USA Rank was 46th, what was the League Rank?
SELECT league AS Rank FROM table_name_54 WHERE year > 2011 AND canada___usa_rank = "46th"
sql_create_context
CREATE TABLE table_18118221_1 ( rank INTEGER, railway_station VARCHAR )
What is the lowest rank of Gatwick Airport?
SELECT MIN(rank) FROM table_18118221_1 WHERE railway_station = "Gatwick Airport"
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
give me the number of patients whose days of hospital stay is greater than 5 and diagnoses short title is personality disorder nos?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "5" AND diagnoses.short_title = "Personality disorder NOS"
mimicsql_data
CREATE TABLE table_name_64 ( reactortype VARCHAR, gross_capacity VARCHAR, electricity_grid VARCHAR )
Which Reactortype has a gross capacity of 417 mw and an Electricity Grid of 27.12.1971?
SELECT reactortype FROM table_name_64 WHERE gross_capacity = "417 mw" AND electricity_grid = "27.12.1971"
sql_create_context
CREATE TABLE table_44489 ( "Team" text, "Tries for" text, "Tries against" text, "Try diff" text, "Points for" text, "Points against" text, "Points diff" text )
What is Tries Against, when Try Diff is +15?
SELECT "Tries against" FROM table_44489 WHERE "Try diff" = '+15'
wikisql
CREATE TABLE table_71835 ( "Park" text, "Tower height" text, "Drop height*" text, "Speed" text, "Model" text, "Opened" text, "Height requirement" text )
What park opened in 1999?
SELECT "Park" FROM table_71835 WHERE "Opened" = '1999'
wikisql
CREATE TABLE table_66282 ( "Elector" text, "Nationality" text, "Cardinalatial order and title" text, "Elevated" text, "Elevator" text )
Who is the elevator from crema?
SELECT "Elevator" FROM table_66282 WHERE "Nationality" = 'crema'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
检测指标504296数值在被门诊诊断为疾病W55.859的患者身上的平均值以及最值都各自是多少?
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JY...
css
CREATE TABLE table_30485 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
Name who directed the episode 'bro-lo el cu ado
SELECT "Directed by" FROM table_30485 WHERE "Title" = 'Bro-Lo El Cuñado'
wikisql
CREATE TABLE table_train_160 ( "id" int, "alt" float, "systolic_blood_pressure_sbp" int, "ast" float, "platelet_count" float, "diastolic_blood_pressure_dbp" int, "serum_creatinine" float, "triglyceride_tg" float, "hypertension" bool, "NOUSE" float )
serum creatinine > 1.5 mg / dl or greater than 1.5x the upper limit of normal for age
SELECT * FROM table_train_160 WHERE serum_creatinine > 1.5
criteria2sql
CREATE TABLE table_name_99 ( date VARCHAR, record VARCHAR )
What is the Date of the game with a Record of 8 10 6?
SELECT date FROM table_name_99 WHERE record = "8–10–6"
sql_create_context
CREATE TABLE table_7456 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the largest number of silver that had 0 bronzes and total less than 1?
SELECT MAX("Silver") FROM table_7456 WHERE "Bronze" = '0' AND "Total" < '1'
wikisql
CREATE TABLE product ( product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR )
Find products with max page size as 'A4' or pages per minute color smaller than 5.
SELECT product FROM product WHERE max_page_size = "A4" OR pages_per_minute_color < 5
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTasks (...
How many posts have the exact same number of answers.
SELECT AcceptedAnswerId FROM Posts WHERE NOT AcceptedAnswerId IS NULL
sede
CREATE TABLE table_66283 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
What is the name of the swimmer from Australia in lane 4 with a heat larger than 4?
SELECT "Name" FROM table_66283 WHERE "Heat" > '4' AND "Lane" = '4' AND "Nationality" = 'australia'
wikisql
CREATE TABLE all_documents ( document_id number, date_stored time, document_type_code text, document_name text, document_description text, other_details text ) CREATE TABLE employees ( employee_id number, role_code text, employee_name text, gender_mfu text, date_of_birth tim...
Count the total number of roles listed.
SELECT COUNT(*) FROM roles
spider
CREATE TABLE table_25087 ( "#" real, "District" text, "Province" text, "Region" text, "UBIGEO" real, "Elevation (m)" real )
Which province has an elevation of 4550?
SELECT "Province" FROM table_25087 WHERE "Elevation (m)" = '4550'
wikisql
CREATE TABLE table_name_37 ( week INTEGER, attendance VARCHAR )
Tell me the lowest week for attendance of 60,894
SELECT MIN(week) FROM table_name_37 WHERE attendance = "60,894"
sql_create_context
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight ( aircraft_code_sequence text, ...
information on AA from WASHINGTON to FORT WORTH
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'FORT WORTH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WA...
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...
从2014年2月27日到2014年5月23日,列出病人60960957这期间所有检验报告单中的标本采集部位
SELECT jybgb.BBCJBW FROM hz_info JOIN txmzjzjlb JOIN jybgb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '60960957' AND jybgb.BGRQ BETWEEN '2014-02-27' AND '201...
css
CREATE TABLE table_74011 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text )
Name the party for virginia 12
SELECT "Party" FROM table_74011 WHERE "District" = 'Virginia 12'
wikisql
CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, position INTEGER, time TEXT, milliseconds INTEGER ) CREATE TABLE constructorResults ( constructorResultsId INTEGER, raceId INTEGER, constructorId INTEGER, points REAL, status TEXT ) CREATE TABLE qualifyi...
A bar chart for what are the number of the names of races held between 2009 and 2011?
SELECT name, COUNT(name) FROM races WHERE year BETWEEN 2009 AND 2011 GROUP BY name
nvbench
CREATE TABLE table_name_96 ( player VARCHAR, round VARCHAR )
What player was selected in Round 6?
SELECT player FROM table_name_96 WHERE round = 6
sql_create_context
CREATE TABLE table_51128 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
On which week was the opponent the oakland raiders?
SELECT SUM("Week") FROM table_51128 WHERE "Opponent" = 'oakland raiders'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
能告诉我病人55103393所有医疗记录中医疗费总额在6694.41元以上的入院诊断疾病编码和名称吗
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '55103393' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6694.41)
css
CREATE TABLE table_9778 ( "Rank" real, "Peak Name" text, "Elevation (ft)" real, "Range" text, "Isolation" real )
WHAT IS THE ELEVATION OF THE UNAKA MOUNTAINS, IN ROAN HIGH BLUFF PEAK, AND ISOLATION LARGER THAN 1.54?
SELECT AVG("Elevation (ft)") FROM table_9778 WHERE "Range" = 'unaka mountains' AND "Peak Name" = 'roan high bluff' AND "Isolation" > '1.54'
wikisql
CREATE TABLE table_name_18 ( driver VARCHAR, grid VARCHAR )
Who is the driver when the grid is 18?
SELECT driver FROM table_name_18 WHERE grid = "18"
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...
门诊诊断为患者15378011患有疾病Q04.549的的检测指标342222的结果定量和其单位都是啥?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jyb...
css
CREATE TABLE table_name_48 ( institution VARCHAR, nickname VARCHAR, classification VARCHAR, current_conference VARCHAR )
What institution is a NCAA Division i school and part of the NEC conference with a nickname the Blue Devils?
SELECT institution FROM table_name_48 WHERE classification = "ncaa division i" AND current_conference = "nec" AND nickname = "blue devils"
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
门诊诊断为患者15378011患有疾病Q04.549的的检测指标342222的结果定量和其单位都是啥?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb...
css
CREATE TABLE table_15241 ( "Company" text, "Plan name" text, "Technology" text, "Maximum download speed/ kbps" text, "Data limit/ GB" text, "Monthly price incl. VAT/ CZK" text )
What is the maximum download speed for the Internet basic plan with 3G?
SELECT "Maximum download speed/ kbps" FROM table_15241 WHERE "Technology" = '3g' AND "Plan name" = 'internet basic'
wikisql
CREATE TABLE table_76021 ( "Event" text, "Winner" text, "Second" text, "Third" text, "Fourth" text )
Who was in Second Place with Isabelle Brayley came in Fourth?
SELECT "Second" FROM table_76021 WHERE "Fourth" = 'isabelle brayley'
wikisql
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, ...
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"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
what is the number of patients who take drug via oral route and have diabetes mellitus without mention of complication, type ii or unspecified type, not stated as uncontrolled diagnoses?
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.long_title = "Diabetes mellitus without mention of complication, type II or unspecified type, not stated ...
mimicsql_data
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
how many patients whose age is less than 80 and procedure icd9 code is 4610?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "80" AND procedures.icd9_code = "4610"
mimicsql_data
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 marital status is married and diagnoses short title is bleed esoph var oth dis?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.short_title = "Bleed esoph var oth dis"
mimicsql_data
CREATE TABLE table_3118 ( "Venue" text, "Hosted" real, "Average" real, "Highest" real, "Lowest" real, "Total" real, "Last Year" text, "Up/Down" text )
How many values of up/down have a total value of exactly 301470?
SELECT COUNT("Up/Down") FROM table_3118 WHERE "Total" = '301470'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
50197380603门诊就诊中患者的身高和体重如何?他的体温、收缩压、舒张压、心率、呼吸频率、脉率的具体数据呢
SELECT txmzjzjlb.SG, txmzjzjlb.TZ, txmzjzjlb.TW, txmzjzjlb.SSY, txmzjzjlb.SZY, txmzjzjlb.XL, txmzjzjlb.HXPLC, txmzjzjlb.ML FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '50197380603' UNION SELECT ftxmzjzjlb.SG, ftxmzjzjlb.TZ, ftxmzjzjlb.TW, ftxmzjzjlb.SSY, ftxmzjzjlb.SZY, ftxmzjzjlb.XL, ftxmzjzjlb.HXPLC, ftxmzjzjlb.ML FROM ft...
css
CREATE TABLE match_result ( Rank int, Club_ID int, Gold int, Big_Silver int, Small_Silver int, Bronze int, Points int ) CREATE TABLE club ( Club_ID int, Club_name text, Region text, Start_year int ) CREATE TABLE player ( Player_ID int, Sponsor_name text, Player_...
Compare the distribution of the players' gender using a bar chart, rank by the total number in ascending.
SELECT Gender, COUNT(Gender) FROM player GROUP BY Gender ORDER BY COUNT(Gender)
nvbench
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code te...
what were the three most common medicines that patients were prescribed within 2 months after receiving a insert spinal canal cath procedure in this year?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures ...
mimic_iii
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 Comments ( Id number, PostId number, ...
Search for a specific code string.
SELECT Id AS "post_link", * FROM Posts WHERE (OwnerUserId = 101651) AND (Body LIKE '%multicolumn{1}%')
sede
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, ...
what are the new prescriptions of patient 005-4471 today compared to those given yesterday?
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '005-4471') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medicat...
eicu
CREATE TABLE Room ( RoomNumber INTEGER, RoomType VARCHAR(30), BlockFloor INTEGER, BlockCode INTEGER, Unavailable BOOLEAN ) CREATE TABLE Block ( BlockFloor INTEGER, BlockCode INTEGER ) CREATE TABLE Affiliated_With ( Physician INTEGER, Department INTEGER, PrimaryAffiliation BOOLE...
How many medications are prescribed for each brand Visualize by bar chart, and could you list Y-axis in asc order?
SELECT Name, COUNT(*) FROM Medication AS T1 JOIN Prescribes AS T2 ON T1.Code = T2.Medication GROUP BY T1.Brand ORDER BY COUNT(*)
nvbench
CREATE TABLE table_40825 ( "AIRLINE" text, "ICAO" text, "IATA" text, "CALLSIGN" text, "COMMENCED OPERATIONS" text )
What is the commenced operation where the ICAO is KAL?
SELECT "COMMENCED OPERATIONS" FROM table_40825 WHERE "ICAO" = 'kal'
wikisql
CREATE TABLE table_name_89 ( notes VARCHAR, year VARCHAR )
What were the notes in 2011?
SELECT notes FROM table_name_89 WHERE year = 2011
sql_create_context
CREATE TABLE table_10744 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
who is the constructor when the grid is more than 10 and the time/retired is +1 lap?
SELECT "Constructor" FROM table_10744 WHERE "Grid" > '10' AND "Time/Retired" = '+1 lap'
wikisql