context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_67 (
builder VARCHAR,
ship VARCHAR
) | What is Builder, when Ship is 'Arizona'? | SELECT builder FROM table_name_67 WHERE ship = "arizona" | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 38758660的患者之前会有哪些不良反应 | SELECT * FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
CREATE TABLE Products_in_Events (
Product_in_Event_ID INTEGER,
Event_ID INTEGER,
Product_ID INTEGER
)
CREATE TABLE Addresses (
Address_ID INTEGER,
address_details VARCHAR(255)
)
CREATE TABLE Events (
Event_ID INTEGER,
Address_ID INTEGER,
Channel_ID INTEGER,
Event_Type_Code CHAR(15)... | Compare the total number of different product type codes, sort in asc by the X-axis please. | SELECT Product_Type_Code, COUNT(Product_Type_Code) FROM Products GROUP BY Product_Type_Code ORDER BY Product_Type_Code | nvbench |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the hire_date bin hire_date by time. | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
... | has patient 030-60126 had a neurosurgery procedure at other hospitals in 2105? | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '030-60126' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '030-60126' AND patient.hospitaldischargetime IS NULL)) AND tr... | eicu |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 吴嘉惠这个病患腰部的各项指标的检验咋样 | (SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGD... | css |
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,
... | 了解一下患者的卡号以及卡的类型,主要针对门诊就诊96594667159的病人 | SELECT zzmzjzjlb.KH, zzmzjzjlb.KLX FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '96594667159' UNION SELECT fzzmzjzjlb.KH, fzzmzjzjlb.KLX FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '96594667159' | css |
CREATE TABLE table_51476 (
"Number" real,
"Artist" text,
"Album" text,
"1st week sales" real,
"1st week position" text
) | What is the 1st week sales for the album finding forever before the number 6? | SELECT SUM("1st week sales") FROM table_51476 WHERE "Album" = 'finding forever' AND "Number" < '6' | wikisql |
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 cost (
costid num... | when patient 005-5915 first received the bronchodilator - beta-agonist until 4 years ago? | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-5915')) AND treatment.treatmentname = 'bronchodilator - beta-... | eicu |
CREATE TABLE table_204_774 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | how many times has he played against honduras ? | SELECT COUNT(*) FROM table_204_774 WHERE "opponent" = 'honduras' | squall |
CREATE TABLE table_name_48 (
position VARCHAR,
points VARCHAR,
series VARCHAR,
season VARCHAR
) | What is Position, when Series is Queensland Formula Ford Championship, when Season is after 2001, and when Points is 234? | SELECT position FROM table_name_48 WHERE series = "queensland formula ford championship" AND season > 2001 AND points = "234" | sql_create_context |
CREATE TABLE table_17322817_6 (
high_assists VARCHAR,
high_rebounds VARCHAR
) | Name the high assists for yi jianlian , brook lopez (7) | SELECT high_assists FROM table_17322817_6 WHERE high_rebounds = "Yi Jianlian , Brook Lopez (7)" | sql_create_context |
CREATE TABLE table_name_67 (
intercontinental_cup_1998 VARCHAR,
copa_mercosur_1998 VARCHAR
) | what is the runner-up for the intercontinental cup | SELECT intercontinental_cup_1998 FROM table_name_67 WHERE copa_mercosur_1998 = "runner-up" | sql_create_context |
CREATE TABLE table_78849 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
) | Who is the co-contestant (yaar vs. Pyaar) with Vishal Singh as the main contestant? | SELECT "Co-contestant (Yaar vs. Pyaar)" FROM table_78849 WHERE "Main contestant" = 'vishal singh' | wikisql |
CREATE TABLE table_23762 (
"Poll source" text,
"Dates administered" text,
"Joe Miller (R)" text,
"Lisa Murkowski (R) write-in candidate *" text,
"Scott McAdams (D)" text
) | When 23% scott mcadams (d) what are the dates administered? | SELECT "Dates administered" FROM table_23762 WHERE "Scott McAdams (D)" = '23%' | wikisql |
CREATE TABLE table_3547 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
) | What couple had a vote percentage of 5.2%? | SELECT "Couple" FROM table_3547 WHERE "Vote percentage" = '5.2%' | wikisql |
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... | count the number of patients whose marital status is divorced and diagnoses short title is cellulitis of hand? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "DIVORCED" AND diagnoses.short_title = "Cellulitis of hand" | mimicsql_data |
CREATE TABLE table_5164 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | Who is drafted overall less than 49? | SELECT "Name" FROM table_5164 WHERE "Overall" < '49' | wikisql |
CREATE TABLE table_name_95 (
rec INTEGER,
opponent VARCHAR,
average VARCHAR,
s_touchdown VARCHAR
) | Which Rec has an Average smaller than 32, and a Touchdown smaller than 3, and an Opponent of oregon state? | SELECT SUM(rec) FROM table_name_95 WHERE average < 32 AND s_touchdown < 3 AND opponent = "oregon state" | sql_create_context |
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,
... | 住院时长少于15天的记录在医院7236122中有多少个科室达到? | SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '7236122' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING MAX(gwyjzb.IN_HOSP_DAYS) < 15 UNION SELECT fgwyjzb.MED_ORG_DEPT_CD FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '7236122' GROUP BY fgwyjzb.MED_ORG_DEPT_CD HAVING MAX(fgwyjzb.IN_H... | 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 drug type is base and lab test name is calculated thyroxine (t4) index? | 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.drug_type = "BASE" AND lab.label = "Calculated Thyroxine (T4) Index" | mimicsql_data |
CREATE TABLE table_name_34 (
total INTEGER,
country VARCHAR,
to_par VARCHAR
) | What is Zimbabwe's total with a to par higher than 5? | SELECT AVG(total) FROM table_name_34 WHERE country = "zimbabwe" AND to_par > 5 | sql_create_context |
CREATE TABLE table_name_44 (
rank VARCHAR,
nation VARCHAR,
silver VARCHAR,
bronze VARCHAR
) | What rank is Bulgaria with less than 3 silver and more than 1 bronze? | SELECT rank FROM table_name_44 WHERE silver < 3 AND bronze > 1 AND nation = "bulgaria" | sql_create_context |
CREATE TABLE table_name_71 (
melbourne VARCHAR,
perth VARCHAR,
sydney VARCHAR,
gold_coast VARCHAR
) | Which Melbourne has Sydney yes, Gold Coast yes, and Perth yes? | SELECT melbourne FROM table_name_71 WHERE sydney = "yes" AND gold_coast = "yes" AND perth = "yes" | sql_create_context |
CREATE TABLE table_51851 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the Time/Retired that has a Grid smaller than 8, 73 laps, and a Constructor of williams - bmw? | SELECT "Time/Retired" FROM table_51851 WHERE "Grid" < '8' AND "Laps" = '73' AND "Constructor" = 'williams - bmw' | wikisql |
CREATE TABLE table_26349 (
"equation:" text,
"k_{\\mathrm{H,pc}} = \\frac{p}{c_\\mathrm{aq}}" text,
"k_{\\mathrm{H,cp}} = \\frac{c_\\mathrm{aq}}{p}" text,
"k_{\\mathrm{H,px}} = \\frac{p}{x}" text,
"k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" text
) | What wast the 'k_{\mathrm{h,cc}} = \frac{c_{\mathrm{aq}}}{c_{\mathrm{gas}}}' of CO 2? | SELECT "k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" FROM table_26349 WHERE "equation:" = 'CO 2' | wikisql |
CREATE TABLE table_15416002_1 (
saffir_simpson_category INTEGER
) | What is the maximum number for the Saffir-Simpson category in the Carvill Hurricane Index? | SELECT MAX(saffir_simpson_category) FROM table_15416002_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... | give the number of patients whose drug route is sc. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "SC" | mimicsql_data |
CREATE TABLE table_41438 (
"Date" text,
"Location" text,
"Country" text,
"Event" text,
"Winner" text,
"Runner-up" text
) | What is Country, when Event is Rip Curl Women's Pro? | SELECT "Country" FROM table_41438 WHERE "Event" = 'rip curl women''s pro' | wikisql |
CREATE TABLE table_54922 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who was the away team when the home team scored 12.21 (93)? | SELECT "Away team" FROM table_54922 WHERE "Home team score" = '12.21 (93)' | wikisql |
CREATE TABLE table_name_86 (
bronze INTEGER,
rank VARCHAR,
gold VARCHAR
) | What is the largest bronze with a Rank of 2, and a Gold smaller than 8? | SELECT MAX(bronze) FROM table_name_86 WHERE rank = 2 AND gold < 8 | sql_create_context |
CREATE TABLE table_30023 (
"Series #" real,
"Episode #" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | What is the name of episode number 12 of the season? | SELECT "Title" FROM table_30023 WHERE "Episode #" = '12' | wikisql |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,... | Up vs Down votes by hour of day. Doesn't currently work, but that's just because the data isn't currently there. | SELECT TIME_TO_STR(p.CreationDate, '%-HOUR') AS Hour, (CAST(SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) AS FLOAT) / CAST(SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) AS FLOAT)) AS UpVoteDownVoteRatio FROM Votes AS v JOIN Posts AS p ON p.Id = PostId WHERE p.Score >= 0 GROUP BY TIME_TO_STR(p.CreationDate, '%-HOUR'... | sede |
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREATE TABLE Catalog_Contents (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
parent_entry_id INTEGER,
prev... | What are the number of the names of catalog entries with level number 8?, rank from high to low by the X-axis. | SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY catalog_entry_name DESC | nvbench |
CREATE TABLE table_21814 (
"Season" text,
"Timeslot" text,
"Premiere" text,
"Finale" text,
"TV season" text,
"Ranking" text,
"Viewers (in millions)" text
) | What finales took place in the Tuesday 9:30 p.m. timeslot? | SELECT "Finale" FROM table_21814 WHERE "Timeslot" = 'Tuesday 9:30 p.m.' | wikisql |
CREATE TABLE table_53917 (
"Number & Name" text,
"Description" text,
"Livery" text,
"Owner(s)" text,
"Date" real
) | What's the number & name for the description peckett 0-4-0st? | SELECT "Number & Name" FROM table_53917 WHERE "Description" = 'peckett 0-4-0st' | wikisql |
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARC... | Bar chart of how many date of enrolment from each date of enrolment, and could you list by the Y-axis in asc? | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_enrolment) | nvbench |
CREATE TABLE table_name_10 (
second VARCHAR,
skip VARCHAR
) | Which second's skip is Chris Plys? | SELECT second FROM table_name_10 WHERE skip = "chris plys" | sql_create_context |
CREATE TABLE On_Call (
Nurse INTEGER,
BlockFloor INTEGER,
BlockCode INTEGER,
OnCallStart DATETIME,
OnCallEnd DATETIME
)
CREATE TABLE Trained_In (
Physician INTEGER,
Treatment INTEGER,
CertificationDate DATETIME,
CertificationExpires DATETIME
)
CREATE TABLE Procedures (
Code INT... | Which physicians are trained in procedures that are more expensive than 5000, and count them by a bar chart, and list Name from high to low order please. | SELECT T1.Name, COUNT(T1.Name) FROM Physician AS T1 JOIN Trained_In AS T2 ON T1.EmployeeID = T2.Physician JOIN Procedures AS T3 ON T3.Code = T2.Treatment WHERE T3.Cost > 5000 GROUP BY T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
... | flights from CLEVELAND to KANSAS CITY | 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 = 'CLEVELAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'KANS... | atis |
CREATE TABLE table_name_1 (
population VARCHAR,
median_family_income VARCHAR
) | What's the population that has a median family income of $50,553? | SELECT COUNT(population) FROM table_name_1 WHERE median_family_income = "$50,553" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description... | Top User Of a Peticular Tag in India. | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", TagName, COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ... | sede |
CREATE TABLE table_64236 (
"Title" text,
"Label" text,
"Year of Release" real,
"Country of Release" text,
"Peaches:" text
) | What was the earliest year of release for Peaches: Francine Barker with the wounded bird label? | SELECT MIN("Year of Release") FROM table_64236 WHERE "Peaches:" = 'francine barker' AND "Label" = 'wounded bird' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE T... | Just show the first name and the manager id with a bar chart, and order in ascending by the total number. | SELECT T1.FIRST_NAME, T1.MANAGER_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID ORDER BY T1.MANAGER_ID | nvbench |
CREATE TABLE school_details (
school_id number,
nickname text,
colors text,
league text,
class text,
division text
)
CREATE TABLE school_performance (
school_id number,
school_year text,
class_a text,
class_aa text
)
CREATE TABLE player (
player_id number,
player text,
... | Which team has the oldest player? | SELECT team FROM player ORDER BY age DESC LIMIT 1 | spider |
CREATE TABLE table_name_99 (
game INTEGER,
attendance VARCHAR
) | Where was the game that the attendance was 24,694? | SELECT MIN(game) FROM table_name_99 WHERE attendance = 24 OFFSET 694 | sql_create_context |
CREATE TABLE table_24776 (
"Dates (MDY)" text,
"Gross Sales" text,
"Tickets Sold / Available" text,
"Shows / Sellout" text,
"Sellout (%)" text
) | During the period in which gross sales totals for 'The Show Girl Must Go On' reached $2,628,457, what did the numbers show for tickets sold/ available at the box office? | SELECT "Tickets Sold / Available" FROM table_24776 WHERE "Gross Sales" = '$2,628,457' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Tags (
Id number,
TagName text,
C... | Tor Top 100 Favorited Posts. | SELECT Id AS "post_link", FavoriteCount FROM Posts ORDER BY FavoriteCount DESC LIMIT 100 | sede |
CREATE TABLE table_name_80 (
field_goals INTEGER,
position VARCHAR,
touchdowns VARCHAR
) | What is the average number of field goals scored by a right halfback who had more than 3 touchdowns? | SELECT AVG(field_goals) FROM table_name_80 WHERE position = "right halfback" AND touchdowns > 3 | 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,
... | 从07年8月11日到18年7月17日,患者马芳蕙在470787上的检测记录详情 | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM... | css |
CREATE TABLE table_name_25 (
venue VARCHAR,
date VARCHAR,
competition VARCHAR,
result VARCHAR
) | What is Venue, when Competition is 2010 FIFA World Cup Qualification, when Result is Won, and when Date is 14 June 2008? | SELECT venue FROM table_name_25 WHERE competition = "2010 fifa world cup qualification" AND result = "won" AND date = "14 june 2008" | sql_create_context |
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
D... | Give me a group line chart showing the number of documents in different ending date The x-axis is ending date and group by location code, I want to order in descending by the X-axis please. | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code, Date_in_Locaton_To ORDER BY Date_in_Locaton_To DESC | nvbench |
CREATE TABLE table_name_36 (
winning_driver VARCHAR,
pole_position VARCHAR,
circuit VARCHAR
) | Who is the winning driver of the Oschersleben circuit with Timo Scheider as the pole position? | SELECT winning_driver FROM table_name_36 WHERE pole_position = "timo scheider" AND circuit = "oschersleben" | sql_create_context |
CREATE TABLE table_37019 (
"Player" text,
"League" real,
"Malaysia Cup" real,
"FA Cup" real,
"Total" real
) | How many totals have a Player of ahmad fouzee masuri, and an FA Cup larger than 0? | SELECT COUNT("Total") FROM table_37019 WHERE "Player" = 'ahmad fouzee masuri' AND "FA Cup" > '0' | wikisql |
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 prescription... | count the number of patients whose item id is 51200 and lab test abnormal status is delta? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51200" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_name_33 (
date VARCHAR,
location VARCHAR
) | What is the date of the game at Arrowhead Stadium? | SELECT date FROM table_name_33 WHERE location = "arrowhead stadium" | sql_create_context |
CREATE TABLE table_32356 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the score of the home team of carlton? | SELECT "Home team score" FROM table_32356 WHERE "Home team" = 'carlton' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varc... | What 's the number of professors who teach BIOLCHEM 551 in Winter 2012 ? | SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BIOLCHEM' AND course.number = 551 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o... | advising |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id nu... | for the first time during their first hospital encounter, how much sodium bica was prescribed to patient 25723? | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25723 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND prescriptions.drug = 'sodium bica' ORDER BY prescriptions.startdate LIMIT 1 | mimic_iii |
CREATE TABLE table_name_81 (
silver VARCHAR,
total VARCHAR,
gold VARCHAR,
rank VARCHAR
) | What is the total number of Silver, when Gold is less than 34, when Rank is '6', and when Total is greater than 10? | SELECT COUNT(silver) FROM table_name_81 WHERE gold < 34 AND rank = "6" AND total > 10 | sql_create_context |
CREATE TABLE table_49821 (
"Name" text,
"Built" text,
"Listed" text,
"Location" text,
"County" text
) | In which year did Blount County build a bridge in Cleveland that was listed on 1981-08-20? | SELECT "Built" FROM table_49821 WHERE "County" = 'blount' AND "Listed" = '1981-08-20' AND "Location" = 'cleveland' | wikisql |
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 sum of revenue over the name , and group by attribute name. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name | nvbench |
CREATE TABLE table_20246201_9 (
office VARCHAR,
states___third_place VARCHAR
) | Which office has 1 New Hampshire as a third place state? | SELECT office FROM table_20246201_9 WHERE states___third_place = "1 New Hampshire" | sql_create_context |
CREATE TABLE table_55534 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What time/retired has a Grid larger than 3, and a Driver of kimi r ikk nen? | SELECT "Time/Retired" FROM table_55534 WHERE "Grid" > '3' AND "Driver" = 'kimi räikkönen' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 36092630这位患者自11.8.9起,到16.2.17止,看病从医保的统筹基金总共支付了多少金额 | SELECT SUM(OVE_PAY) FROM t_kc24 WHERE PERSON_ID = '36092630' AND CLINIC_SLT_DATE BETWEEN '2011-08-09' AND '2016-02-17' | css |
CREATE TABLE table_name_27 (
score VARCHAR,
place VARCHAR,
country VARCHAR
) | What was sweden's score in T9 place? | SELECT score FROM table_name_27 WHERE place = "t9" AND country = "sweden" | sql_create_context |
CREATE TABLE table_28968 (
"Species" text,
"Common Name" text,
"Protein Name" text,
"Accession Number" text,
"NT Length" text,
"NT Identity" text,
"AA Length" text,
"AA Identity" text,
"E-Value" text
) | What is the nt identity when the species is drosophilia melanogaster? | SELECT "NT Identity" FROM table_28968 WHERE "Species" = 'Drosophilia melanogaster' | wikisql |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_20... | Visualize a bar chart about the distribution of meter_200 and the average of ID , and group by attribute meter_200, and rank by the Y in desc. | SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 ORDER BY AVG(ID) DESC | nvbench |
CREATE TABLE table_4952 (
"Driver" text,
"Seasons" text,
"Entries" real,
"Poles" real,
"Percentage" text
) | How many poles has a percentage of 22.08%? | SELECT SUM("Poles") FROM table_4952 WHERE "Percentage" = '22.08%' | wikisql |
CREATE TABLE table_name_19 (
wins INTEGER,
appearances VARCHAR,
division VARCHAR,
losses VARCHAR
) | How many losses did the East Division have who appeared 18 times and lost 8? | SELECT MIN(wins) FROM table_name_19 WHERE division = "east" AND losses = 8 AND appearances < 18 | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | did patient 99080 have any results of the microbiological staph aureus screen test until 95 months ago? | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99080) AND microbiologyevents.spec_type_desc = 'staph aureus screen' AND DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIME(), '-95 month') | mimic_iii |
CREATE TABLE table_25415 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | What is the score in the final in the year 1994? | SELECT "Score in the final" FROM table_25415 WHERE "Year" = '1994' | wikisql |
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,
... | provide the number of patients whose admission year is less than 2184 and lab test fluid is joint fluid? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2184" AND lab.fluid = "Joint Fluid" | mimicsql_data |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Return a bar chart about the distribution of All_Games and All_Games_Percent , could you order in descending by the names please? | SELECT All_Games, All_Games_Percent FROM basketball_match ORDER BY All_Games DESC | nvbench |
CREATE TABLE table_15958 (
"Song" text,
"Mobiles" real,
"Northern Ireland" real,
"Northern England" real,
"Scotland" real,
"Southern England" real,
"Wales" real,
"Total" real
) | How many votes did Southern England cast whilst Northern Ireland cast 3? | SELECT "Southern England" FROM table_15958 WHERE "Northern Ireland" = '3' | wikisql |
CREATE TABLE table_name_53 (
nationality VARCHAR,
years_for_jazz VARCHAR
) | What is the nationality of all Utah Jazz Players, that played 2011-present? | SELECT nationality FROM table_name_53 WHERE years_for_jazz = "2011-present" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | what was the average sao2 for patient 027-211129. | SELECT AVG(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-211129')) AND NOT vitalperiodic.sao2 IS NULL | eicu |
CREATE TABLE semester (
semester_id int,
semester varchar,
year 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_... | What are the 3 -credit Ecosystem Ecology courses ? | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Ecosystem Ecology%' OR name LIKE '%Ecosystem Ecology%') AND credits = 3 | advising |
CREATE TABLE table_name_49 (
attendance VARCHAR,
week VARCHAR,
date VARCHAR
) | What is the total number in attendance for the game after week 8 that was on November 25, 1979? | SELECT COUNT(attendance) FROM table_name_49 WHERE week > 8 AND date = "november 25, 1979" | sql_create_context |
CREATE TABLE table_20887670_1 (
enrollment VARCHAR,
institution VARCHAR
) | what is the number of enrollment of the central institution? | SELECT enrollment FROM table_20887670_1 WHERE institution = "Central" | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE... | Golden & silver Tag Badges of the site. | SELECT ROW_NUMBER() OVER (ORDER BY Badges.UserId) AS Row, Badges.UserId AS "user_link", Tags.TagName AS "tagname", Badges.Date AS Date FROM Badges, Tags WHERE Badges.TagBased = 1 AND Badges.Class < 3 AND Badges.Name = Tags.TagName ORDER BY Badges.UserId, Badges.Date | sede |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
Creati... | All info Mobile Android Testing without EMulator. | SELECT P.Title, P.Tags, P.ViewCount, P.Score, P.AnswerCount, P.CreationDate FROM Posts AS P WHERE (P.Tags LIKE '%android-testing%') OR (P.Tags LIKE '%robotium%') OR (P.Tags LIKE '%androidviewclient%') OR (P.Tags LIKE '%monkeyrunner%') OR (P.Tags LIKE '%android-espresso%') OR (P.Tags LIKE '%android-emulator%' AND P.Tags... | sede |
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 prescription... | what is procedure icd9 code and procedure short title of subject name thomas nazario? | SELECT procedures.icd9_code, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Thomas Nazario" | mimicsql_data |
CREATE TABLE table_203_653 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | how many more silver medals did russian win than denmark ? | SELECT (SELECT "silver" FROM table_203_653 WHERE "nation" = 'russia') - (SELECT "silver" FROM table_203_653 WHERE "nation" = 'denmark') | squall |
CREATE TABLE table_26803 (
"School" text,
"Mascot" text,
"Location" text,
"Founded" real,
"Entered ISL" real,
"Grades" text,
"Number of Students" text,
"Varsity Teams" real
) | when was lawrence academy at groton established? | SELECT MIN("Founded") FROM table_26803 WHERE "School" = 'Lawrence Academy at Groton' | wikisql |
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num_Employees real
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE management (
department_ID int,
head_ID int,
tempor... | Plot the average of budget in billions over creation in a line chart | SELECT Creation, AVG(Budget_in_Billions) FROM department GROUP BY Creation | nvbench |
CREATE TABLE table_name_67 (
format VARCHAR,
region VARCHAR,
date VARCHAR
) | Tell me the format for worldwide region july 22, 2008 | SELECT format FROM table_name_67 WHERE region = "worldwide" AND date = "july 22, 2008" | sql_create_context |
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... | 从0八年十二月六日开始,截止到一一年三月十一日,医院8895083的住院医疗记录总的数量有多少 | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '8895083' AND IN_HOSP_DATE BETWEEN '2008-12-06' AND '2011-03-11' AND CLINIC_TYPE = '住院' | css |
CREATE TABLE table_3710 (
"Total #" real,
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) | What is largest total number that was written by Sheri Elwood? | SELECT MAX("Total #") FROM table_3710 WHERE "Written by" = 'Sheri Elwood' | 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... | 在医院7400991就诊的病号尤安晏其就诊的科室名称包含肝胆科的全部门诊就诊记录的流水号是什么? | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '尤安晏' AND hz_info.YLJGDM = '7400991' AND mzjzjlb.JZKSMC LIKE '%肝胆科%' | css |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,... | i mean what was the first arterial bp [diastolic] for patient 19412 yesterday? | 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 = 19412)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... | mimic_iii |
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 vitalperiodi... | when was the first intake time of patient 007-8693 on 10/12/last year. | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-8693')) AND intakeoutput.cellpath LIKE '%intake%'... | eicu |
CREATE TABLE table_204_692 (
id number,
"publication" text,
"score" text,
"review" text
) | how many publications used a scale of one to ten scoring system ? | SELECT COUNT("publication") FROM table_204_692 WHERE "score" = 10 | squall |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | give me the number of patients whose age is less than 36 and diagnoses long title is hypotension of hemodialysis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "36" AND diagnoses.long_title = "Hypotension of hemodialysis" | mimicsql_data |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those records from the products and each product's manufacturer, draw a scatter chart about the correlation between code and manufacturer , and group by attribute founder. | SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | nvbench |
CREATE TABLE table_47975 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"Location Attendance" text,
"Record" text
) | Which Record has a Date of january 31? | SELECT "Record" FROM table_47975 WHERE "Date" = 'january 31' | wikisql |
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 prescriptions (
subject_id text,
hadm_id... | what is maximum age of patients whose ethnicity is white - russian and days of hospital stay is 30? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.days_stay = "30" | mimicsql_data |
CREATE TABLE table_name_63 (
time VARCHAR,
lane VARCHAR,
nationality VARCHAR
) | What time has a lane less than 5, with Poland as the nationality? | SELECT time FROM table_name_63 WHERE lane < 5 AND nationality = "poland" | sql_create_context |
CREATE TABLE table_203_241 (
id number,
"name" text,
"founded" number,
"defunct" number,
"country" text,
"publisher" text,
"topics" text,
"external link" text
) | what other company has the same founding year as ace ? | SELECT "name" FROM table_203_241 WHERE "name" <> 'ace' AND "founded" = (SELECT "founded" FROM table_203_241 WHERE "name" = 'ace') | squall |
CREATE TABLE table_19301 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | When was incumbent John Thomas Wilson first elected? | SELECT "First elected" FROM table_19301 WHERE "Incumbent" = 'John Thomas Wilson' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.