context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_48 (
club VARCHAR,
tries_for VARCHAR
) | what is the club that as 100 tries? | SELECT club FROM table_name_48 WHERE tries_for = "100" | sql_create_context |
CREATE TABLE table_name_76 (
competition VARCHAR,
year VARCHAR
) | What was the competition in 2003? | SELECT competition FROM table_name_76 WHERE year = 2003 | sql_create_context |
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... | 申请人的检验报告单92936716541的工号以及姓名是什么? | SELECT jybgb.SQRGH, jybgb.SQRXM FROM jybgb WHERE jybgb.BGDH = '92936716541' | css |
CREATE TABLE table_name_29 (
elevator VARCHAR,
title VARCHAR
) | Which Elevator has a Title of bishop of palestrina? | SELECT elevator FROM table_name_29 WHERE title = "bishop of palestrina" | sql_create_context |
CREATE TABLE table_203_654 (
id number,
"position" number,
"team" text,
"points" number,
"played" number,
"won" number,
"drawn" number,
"lost" number,
"for" number,
"against" number,
"difference" number
) | which brazilian team took the top spot in the 1926 brazilian football cup ? | SELECT "team" FROM table_203_654 ORDER BY "position" LIMIT 1 | squall |
CREATE TABLE table_5608 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the Final" text,
"Score" text
) | What is the score of the match played on a hard surface with an opponent in the final of Elena Likhovtseva? | SELECT "Score" FROM table_5608 WHERE "Surface" = 'hard' AND "Opponent in the Final" = 'elena likhovtseva' | wikisql |
CREATE TABLE gyb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | 投保人号码为43928583的患者的年门诊费一共有多少钱? | SELECT SUM(mzb.MED_CLINIC_ID) FROM mzb WHERE mzb.PERSON_NM = '43928583' | css |
CREATE TABLE bridge (
LOCATION VARCHAR,
name VARCHAR
) | What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'? | SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge' | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Po... | Users with Images in their AboutME. | SELECT Id AS "user_link", Reputation, DisplayName, AboutMe FROM Users WHERE LOWER(AboutMe) LIKE '%great firewall%' OR LOWER(DisplayName) LIKE '%great firewall%' OR LOWER(AboutMe) LIKE '%tian an men%' OR LOWER(DisplayName) LIKE '%tian an men%' OR LOWER(AboutMe) LIKE '%tiananmen%' OR LOWER(DisplayName) LIKE '%tiananmen%'... | sede |
CREATE TABLE table_2897457_8 (
player VARCHAR,
nhl_team VARCHAR
) | Who was drafted to the Vancouver Canucks? | SELECT player FROM table_2897457_8 WHERE nhl_team = "Vancouver Canucks" | 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 each manufacturer's name, what are the prices of their most expensive product?, order in asc by the bars. | SELECT T2.Name, MAX(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY Name | nvbench |
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... | 患者袁嘉丽的哪些门诊就诊记录对应的检验报告单的报告日期是在2016年7月27日之前的?列出它们的流水号 | SELECT zzmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zzmzjzjlb 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 WHERE person_info.XM = '袁嘉丽' AND NOT zzmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2016-07-2... | css |
CREATE TABLE table_45154 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | How many laps were in 1969? | SELECT "Laps" FROM table_45154 WHERE "Year" = '1969' | wikisql |
CREATE TABLE table_64864 (
"Year" text,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
) | What is the genre of the game developed by Nintendo EAD? | SELECT "Genre" FROM table_64864 WHERE "Developer(s)" = 'nintendo ead' | wikisql |
CREATE TABLE table_41545 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What is the date that has yani tseng as the runner (s)-up? | SELECT "Date" FROM table_41545 WHERE "Runner(s)-up" = 'yani tseng' | wikisql |
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHA... | Show the number of accounts for different statement details in a bar chart, and rank by the Y-axis from high to low. | SELECT Statement_Details, COUNT(Statement_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY COUNT(Statement_Details) DESC | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
i... | what was the last time until 70 months ago patient 005-9883 had the maximum anion gap value? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-9883')) AND lab.labname = 'anion gap' AND DATETIME(lab.labresulttime) <= DATETI... | eicu |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
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,
X... | 测验报告单编号为70434114659对应的是哪个住院的病人? | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb JOIN zyjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = zyjzjlb_jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB AND zy... | css |
CREATE TABLE table_77154 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text
) | What date was the opponent the Boston Yanks? | SELECT "Date" FROM table_77154 WHERE "Opponent" = 'boston yanks' | wikisql |
CREATE TABLE table_26118 (
"Date" text,
"Total USAAF" real,
"Tot Officers" real,
"Tot Enlisted" real,
"# overseas" real,
"Officers o/s" real,
"Enlisted o/s" real
) | How many officers o/s were there on the day when the number of USAAF was 2373882? | SELECT MAX("Officers o/s") FROM table_26118 WHERE "Total USAAF" = '2373882' | wikisql |
CREATE TABLE table_11392 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the average number of laps for a grid of 6? | SELECT AVG("Laps") FROM table_11392 WHERE "Grid" = '6' | wikisql |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course (
course_id int,
na... | What computing infrastructure courses are offered in Winter or Fall 2012 ? | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE area.area LIKE '%compu... | advising |
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE flight (
flno number(4,0),
origin var... | For each origin, how many flights came from there Show bar chart, I want to sort from low to high by the y axis. | SELECT origin, COUNT(*) FROM flight GROUP BY origin ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_19662262_6 (
economy_rate VARCHAR,
strike_rate VARCHAR
) | What is the economy when the strike rate is 54.0? | SELECT economy_rate FROM table_19662262_6 WHERE strike_rate = "54.0" | sql_create_context |
CREATE TABLE table_59101 (
"Original NFL team" text,
"Player" text,
"Pos." text,
"College" text,
"Conf." text
) | Who's the original team for Rashied Davis Category:articles with hcards? | SELECT "Original NFL team" FROM table_59101 WHERE "Player" = 'rashied davis category:articles with hcards' | wikisql |
CREATE TABLE table_name_74 (
tournament VARCHAR
) | What is 2001, when 1994 is 'A', and when Tournament is 'Monte Carlo Masters'? | SELECT 2001 FROM table_name_74 WHERE 1994 = "a" AND tournament = "monte carlo masters" | 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,
... | 为病人陶宏伯检测降钙素原的在06年5月31日到21年10月31日内的医务人员工号及姓名都是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.BGDH = jyjgzbb.... | css |
CREATE TABLE table_203_519 (
id number,
"pos" number,
"no" number,
"driver" text,
"team" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | which driver earned the least amount of points . | SELECT "driver" FROM table_203_519 ORDER BY "points" LIMIT 1 | squall |
CREATE TABLE table_name_93 (
home_team VARCHAR,
venue VARCHAR
) | What team is from Lake Oval? | SELECT home_team FROM table_name_93 WHERE venue = "lake oval" | sql_create_context |
CREATE TABLE table_1757 (
"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 original air dates have U.S. Views (millions) of 19.49? | SELECT COUNT("Original air date") FROM table_1757 WHERE "U.S. viewers (millions)" = '19.49' | wikisql |
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATETIME,
amount_of_transaction DECIMAL(19,4),
share_count VARCHAR(40),
oth... | For the transaction dates if share count is smaller than 10, bin the dates into the year interval, and count them using a line chart, order X from low to high order. | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count < 10 ORDER BY date_of_transaction | nvbench |
CREATE TABLE table_name_81 (
score VARCHAR,
record VARCHAR
) | What is the score of the game where the Rangers record was 16-8-4? | SELECT score FROM table_name_81 WHERE record = "16-8-4" | sql_create_context |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(5... | Return a bar chart on how many bookings does each booking status have? List the booking status code and the number of corresponding bookings, could you rank by the x-axis from low to high? | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY booking_status_code | nvbench |
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... | 低于15岁的病人的医疗记录的医疗费总额是多少?统计平均值 | SELECT AVG(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_AGE < 15) | css |
CREATE TABLE table_17525955_2 (
episode__number VARCHAR,
us_air_date VARCHAR
) | How many episodes were originally aired Saturday, May 30, 2009? | SELECT COUNT(episode__number) FROM table_17525955_2 WHERE us_air_date = "Saturday, May 30, 2009" | sql_create_context |
CREATE TABLE table_name_12 (
year INTEGER,
position VARCHAR,
venue VARCHAR
) | What was the latest year in which she took 4th position in Budapest, Hungary? | SELECT MAX(year) FROM table_name_12 WHERE position = "4th" AND venue = "budapest, hungary" | sql_create_context |
CREATE TABLE table_name_1 (
score VARCHAR,
record VARCHAR
) | What was the score of the game with a record of 34 17 11 2? | SELECT score FROM table_name_1 WHERE record = "34–17–11–2" | sql_create_context |
CREATE TABLE table_204_932 (
id number,
"#" number,
"title" text,
"time" text,
"lead vocals" text,
"notes" text
) | what is the track before melodies from heaven ? | SELECT "title" FROM table_204_932 WHERE "#" = (SELECT "#" FROM table_204_932 WHERE "title" = 'melodies from heaven') - 1 | squall |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId numb... | Most popular StackOverflow tags in June 2010. | SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS JuneRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInJune, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId ... | sede |
CREATE TABLE table_10670 (
"English" text,
"Malay" text,
"Bukar-Sadong" text,
"Bau-Jagoi" text,
"Siburan-Padawan" text,
"Bra'ang-Pinyawa" text,
"Lundu (Salako)" text,
"Kapampangan" text,
"Tagalog" text
) | What is the Kapampangan word for the Malay word aku? | SELECT "Kapampangan" FROM table_10670 WHERE "Malay" = 'aku' | wikisql |
CREATE TABLE table_77898 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which home team has a Away team of hawthorn? | SELECT "Home team" FROM table_77898 WHERE "Away team" = 'hawthorn' | wikisql |
CREATE TABLE table_15237 (
"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 data limit for a T-Mobile internet basic plan? | SELECT "Data limit/ GB" FROM table_15237 WHERE "Company" = 't-mobile' AND "Plan name" = 'internet basic' | wikisql |
CREATE TABLE table_name_43 (
result VARCHAR,
date VARCHAR
) | What was the result of the match on December 1, 1963? | SELECT result FROM table_name_43 WHERE date = "december 1, 1963" | sql_create_context |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varcha... | show the flights from MILWAUKEE to ORLANDO on a THURSDAY morning | 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, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ORLANDO' AND days.day_name = 'THURSDAY' AND flight.flight_days = days.days_code AN... | atis |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptio... | does patient 15178 have a normal sao2 since 11/05/2100? | SELECT COUNT(*) > 0 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 = 15178)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sao2' AND d_items... | mimic_iii |
CREATE TABLE table_54418 (
"Track" real,
"Recorded" text,
"Release Date" text,
"Song Title" text,
"Writer(s)" text,
"Time" text
) | What is the title of the song with a track less than 8 released on 3/22/57? | SELECT "Song Title" FROM table_54418 WHERE "Track" < '8' AND "Release Date" = '3/22/57' | wikisql |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by time, and could you list total number in desc order? | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY COUNT(HIRE_DATE) DESC | nvbench |
CREATE TABLE table_10432351_1 (
radius__r___ INTEGER
) | What is the smallest possible radius? | SELECT MIN(radius__r___) FROM table_10432351_1 | sql_create_context |
CREATE TABLE table_4644 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the highest crowd population when the away team is Geelong? | SELECT MAX("Crowd") FROM table_4644 WHERE "Away team" = 'geelong' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Visualize a bar chart about the distribution of ACC_Road and the average of School_ID , and group by attribute ACC_Road, I want to sort in desc by the y axis. | SELECT ACC_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(School_ID) DESC | nvbench |
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,
... | tell me the age and marital status of patient with patient id 990. | SELECT demographic.marital_status, demographic.age FROM demographic WHERE demographic.subject_id = "990" | mimicsql_data |
CREATE TABLE table_76801 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Heat points" real,
"Opponents" real,
"Record" text,
"Streak" text
) | What is Heat Points, when Game is less than 80, and when Date is 'April 26 (First Round)'? | SELECT "Heat points" FROM table_76801 WHERE "Game" < '80' AND "Date" = 'april 26 (first round)' | wikisql |
CREATE TABLE table_28248 (
"Stage" real,
"Winner" text,
"General Classification" text,
"Points Classification" text,
"Young Rider Classification" text,
"Teams Classification" text
) | How many stages did Team Sky lead the teams classification? | SELECT MAX("Stage") FROM table_28248 WHERE "Teams Classification" = 'Team Sky' | wikisql |
CREATE TABLE table_name_58 (
round INTEGER,
player VARCHAR,
pick VARCHAR
) | What is the littlest round that has Matt Delahey, and a greater than 112 pick? | SELECT MIN(round) FROM table_name_58 WHERE player = "matt delahey" AND pick > 112 | 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... | provide the number of patients whose insurance is private and diagnoses long title is hematoma complicating a procedure? | 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 = "Hematoma complicating a procedure" | mimicsql_data |
CREATE TABLE table_48503 (
"Result" text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | Where was the decision draw before round 5? | SELECT "Location" FROM table_48503 WHERE "Method" = 'decision draw' AND "Round" < '5' | 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,
... | how many patients had their lab test name as mesothelial cells? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Mesothelial cells" | mimicsql_data |
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,
... | how many patients are diagnosed with intestinal abscess? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Intestinal abscess" | mimicsql_data |
CREATE TABLE table_1342013_9 (
first_elected VARCHAR,
incumbent VARCHAR
) | how many first elected with incumbent being william c. lantaff | SELECT COUNT(first_elected) FROM table_1342013_9 WHERE incumbent = "William C. Lantaff" | 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
)
... | what is minimum age of patients whose insurance is private and discharge location is snf? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "SNF" | mimicsql_data |
CREATE TABLE table_19017269_5 (
world INTEGER
) | what is the worlds smallest population? | SELECT MIN(world) FROM table_19017269_5 | sql_create_context |
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... | 姓名为喻茂学的病人在医院8314168出院的时候其诊断疾病名称没有包括俩字的医疗就诊记录编号是多少呢? | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '喻茂学' AND t_kc21.MED_SER_ORG_NO = '8314168' AND NOT t_kc21.OUT_DIAG_DIS_NM LIKE '%包括%' | css |
CREATE TABLE table_name_45 (
name VARCHAR,
format VARCHAR,
frequency VARCHAR
) | Which owner has a Contemporary Christian music station on 97.9 FM? | SELECT name FROM table_name_45 WHERE format = "contemporary christian music" AND frequency = "97.9 fm" | sql_create_context |
CREATE TABLE table_name_48 (
goals INTEGER,
season VARCHAR
) | What is the sum of goals for the 2004/05 Season? | SELECT SUM(goals) FROM table_name_48 WHERE season = "2004/05" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | select count(*) from posts where posts.ViewCount > 58000. | SELECT * FROM Posts WHERE Posts.ViewCount > 39955 AND Posts.ViewCount < 58000 | sede |
CREATE TABLE table_test_8 (
"id" int,
"anemia" bool,
"intra_aortic_balloon_pump_iabp" bool,
"systolic_blood_pressure_sbp" int,
"intravenous_pressors" bool,
"fever" bool,
"hemoglobin_a1c_hba1c" float,
"heart_disease" bool,
"vasopressors" bool,
"renal_disease" bool,
"temperatur... | cardiogenic shock ( defined as systolic blood pressure < 80 mmhg requiring intravenous pressors or intra _ aortic balloon counterpulsation ) | SELECT * FROM table_test_8 WHERE cardiogenic_shock = 1 OR (systolic_blood_pressure_sbp < 80 OR intravenous_pressors = 1 OR intra_aortic_balloon_pump_iabp = 1) | criteria2sql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the correlation between commission_pct and manager_id in a scatter chart. | SELECT COMMISSION_PCT, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_46023 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What is the lowest Pick #, when Position is REC, and when CFL Team is Hamilton Tiger-Cats? | SELECT MIN("Pick #") FROM table_46023 WHERE "Position" = 'rec' AND "CFL Team" = 'hamilton tiger-cats' | wikisql |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate tim... | Grab all questions with both Android and Arduino tags asked on or after the specified date.. Grab all questions with both Android and Arduino tags asked on or after the specified date. | SELECT Id AS "post_link", CreationDate FROM Posts WHERE PostTypeId = 1 AND EXISTS(SELECT 1 FROM PostTags WHERE PostId = Posts.Id AND TagId = @AndroidTagId) AND EXISTS(SELECT 1 FROM PostTags WHERE PostId = Posts.Id AND TagId = @ArduinoTagId) AND CreationDate >= '##date##' ORDER BY CreationDate DESC | sede |
CREATE TABLE table_28811 (
"Name" text,
"Sweet" text,
"Species" text,
"Gender" text,
"Attribute" text,
"Birthday" text,
"Media Debut" text,
"Voice Actor" text
) | what is the media debut for the asian black bear? | SELECT "Media Debut" FROM table_28811 WHERE "Species" = 'Asian black bear' | wikisql |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
C... | Most popular tag in 2014. | SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS MayRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInMay, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AN... | sede |
CREATE TABLE table_63368 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What was Rosie's winning score on Apr 29, 2001? | SELECT "Winning score" FROM table_63368 WHERE "Date" = 'apr 29, 2001' | wikisql |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE stud... | Will MEDEDUC 599 be having class on Friday ? | SELECT DISTINCT course_offering.friday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'MEDEDUC' AND course.number = 599 AND semester.semester = 'WN' AND semester.year = 2016 | advising |
CREATE TABLE table_27736 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text
) | This institution nicknamed Fightin' engineers was founded on what year? | SELECT "Founded" FROM table_27736 WHERE "Nickname" = 'Fightin'' Engineers' | wikisql |
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
)
... | calculate the maximum age of russian speaking patients who have bradycardia primary disease. | SELECT MAX(demographic.age) FROM demographic WHERE demographic.language = "RUSS" AND demographic.diagnosis = "BRADYCARDIA" | mimicsql_data |
CREATE TABLE table_name_46 (
venue VARCHAR,
date VARCHAR
) | What is Venue, when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912? | SELECT venue FROM table_name_46 WHERE date = "23,24,26,27,28,29 feb, 1 mar 1912" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | provide the number of patients whose gender is m and drug route is ng? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.route = "NG" | mimicsql_data |
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,
... | 在医院4316976中列举出患者81533659门诊诊断名称包含相的门诊就诊记录有哪些? | SELECT * FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '81533659' AND hz_info.YLJGDM = '4316976' AND txmzjzjlb.JZZDSM LIKE '%相%' UNION SELECT * FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJGDM = ftxmzjzjlb.YLJGDM AND hz_... | css |
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(50),
customer_middle_initial VARCHAR(1),
customer_last_name VARCHAR(50),
gender VARCHAR(1),
email_address VARCHAR(255),
login_name VARCHAR(80),
login_password VARCHAR(20),
phone_number VARCHAR(255),
town_ci... | Show the transaction types and the total amount of transactions, rank transaction_type from high to low order please. | SELECT transaction_type, SUM(transaction_amount) FROM Financial_Transactions GROUP BY transaction_type ORDER BY transaction_type 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | count the number of patients whose procedure long title is endoscopic insertion of stent (tube) into bile duct and lab test fluid is pleural? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Endoscopic insertion of stent (tube) into bile duct" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of first_name and employee_id , order by the X in ascending. | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME | nvbench |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
D... | Time to first answer (by specific user). | SELECT CAST((JULIANDAY(CreationDate) - JULIANDAY(q.CreationDate)) * 1440.0 AS INT), COUNT(*) AS "Number of questions answered within x minutes" FROM Posts AS q JOIN LATERAL (SELECT MIN(CreationDate) AS CreationDate FROM Posts WHERE ParentId = q.Id AND OwnerUserId = '##UserId:int##' AND CreationDate >= q.CreationDate) A... | sede |
CREATE TABLE table_54580 (
"Week" text,
"Date" text,
"Opponent" text,
"Home/Away Game" text,
"Result" text
) | Who was the opponent on week 5? | SELECT "Opponent" FROM table_54580 WHERE "Week" = '5' | wikisql |
CREATE TABLE table_19314 (
"Model" text,
"Year" text,
"Die Size (mm 2 ) [1]" text,
"Config core [2]" text,
"MTriangles/s [1]" real,
"MPixel/s [1]" real,
"Bus width ( bit )" text,
"DirectX" text,
"OpenGL" text,
"OpenGL ES" text,
"GFLOPS(@ 200MHz)" text,
"Frequency" real
) | What is the die size(mm 2) for model sgx531? | SELECT "Die Size (mm 2 ) [1]" FROM table_19314 WHERE "Model" = 'SGX531' | wikisql |
CREATE TABLE table_name_84 (
attendance VARCHAR,
visitor VARCHAR
) | Name the total number of attendance when the cavaliers visited | SELECT COUNT(attendance) FROM table_name_84 WHERE visitor = "cavaliers" | sql_create_context |
CREATE TABLE table_31604 (
"Year" real,
"Team/Chassis" text,
"Engine" text,
"Tyres" text,
"Points" real
) | What is the total number of points team Alfa Romeo 184T won? | SELECT SUM("Points") FROM table_31604 WHERE "Team/Chassis" = 'alfa romeo 184t' | wikisql |
CREATE TABLE table_47953 (
"Date" text,
"Region" text,
"Label" text,
"Catalogue" text,
"Format" text
) | What is Date, when Region is Yugoslavia? | SELECT "Date" FROM table_47953 WHERE "Region" = 'yugoslavia' | wikisql |
CREATE TABLE table_18514 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | In the District Tennessee 7 what is the number of first elected? | SELECT MAX("First elected") FROM table_18514 WHERE "District" = 'Tennessee 7' | wikisql |
CREATE TABLE table_name_33 (
rank VARCHAR,
finish VARCHAR
) | What rank has a 25 finish? | SELECT rank FROM table_name_33 WHERE finish = "25" | sql_create_context |
CREATE TABLE table_name_88 (
Severe INTEGER,
strongest_storm VARCHAR,
tropical_lows VARCHAR
) | What is the least number of tropical cyclones when the strongest storm was Tiffany and less than 10 tropical lows. | SELECT MIN(Severe) AS tropical_cyclones FROM table_name_88 WHERE strongest_storm = "tiffany" AND tropical_lows > 10 | sql_create_context |
CREATE TABLE table_name_53 (
home VARCHAR,
time VARCHAR
) | Who was the home team of the game at the time of 14:00? | SELECT home FROM table_name_53 WHERE time = "14:00" | sql_create_context |
CREATE TABLE table_36821 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) | What year had 6.62 m in the notes? | SELECT "Year" FROM table_36821 WHERE "Notes" = '6.62 m' | wikisql |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE PROFESSOR (
EMP_N... | How many professors have a PhD in each department Show bar chart, and could you order by the y-axis from low to high? | SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_29804 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) | What is the production code for the episode that had 23.9 million u.s. viewers? | SELECT "Production code" FROM table_29804 WHERE "U.S. viewers (millions)" = '23.9' | wikisql |
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
... | Return a histogram on how many professors have a PhD in each department?, and list in descending by the bar please. | SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE ORDER BY DEPT_CODE DESC | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | when is the last time that patient 013-36766 has received a total bilirubin lab test until 07/2101? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-36766')) AND lab.labname = 'total bilirubin' AND STRFTIME('%y-%m', lab.labresul... | eicu |
CREATE TABLE table_64019 (
"Position" real,
"Sail Number" text,
"Yacht" text,
"State/Country" text,
"Yacht Type" text,
"LOA (Metres)" real,
"Skipper" text,
"Corrected Time d:hh:mm:ss" text
) | What type of yacht has a LOA of 15.15 metres? | SELECT "Yacht Type" FROM table_64019 WHERE "LOA (Metres)" = '15.15' | wikisql |
CREATE TABLE table_name_78 (
socialist_labor_ticket VARCHAR,
office VARCHAR
) | Which Socialist Labor ticket has a Office of secretary of state? | SELECT socialist_labor_ticket FROM table_name_78 WHERE office = "secretary of state" | sql_create_context |
CREATE TABLE Grants (
grant_id INTEGER,
organisation_id INTEGER,
grant_amount DECIMAL(19,4),
grant_start_date DATETIME,
grant_end_date DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Project_Staff (
staff_id DOUBLE,
project_id INTEGER,
role_code VARCHAR(10),
date_from DATETI... | For all organizations that have grants of more than 6000 dollars, compare the number of details of the organizations with a bar chart. | SELECT organisation_details, COUNT(organisation_details) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY organisation_details | nvbench |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program (
program_id int,
name v... | Is CONDUCT 407 offered right now ? | SELECT COUNT(*) > 0 FROM course, course_offering, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CONDUCT' AND course.number = 407 AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'WN' AND semester.semester_id = course_of... | advising |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.