context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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... | Give the number of patients whose primary disease is cerebral aneurysm/sda and were admitted before the year 2200. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CEREBRAL ANEURYSM/SDA" AND demographic.admityear < "2200" | mimicsql_data |
CREATE TABLE table_203_747 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | what is the total number of medals that india won in the asian youth games ? | SELECT "total" FROM table_203_747 WHERE "nation" = 'india' | squall |
CREATE TABLE table_56756 (
"Round" real,
"Pick" real,
"Name" text,
"Position" text,
"School" text
) | Who is the person from round 8? | SELECT "Name" FROM table_56756 WHERE "Round" = '8' | wikisql |
CREATE TABLE table_17806 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | what was the drawn when the tries for was 46? | SELECT "Drawn" FROM table_17806 WHERE "Tries for" = '46' | wikisql |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instruc... | What 's my current GPA ? | SELECT DISTINCT total_gpa FROM student WHERE student_id = 1 | advising |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule... | A bar chart showing the average price of each cinema, and sort names in ascending order. | SELECT Name, AVG(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cine... | Return a bar chart on what are the title and maximum price of each film?, display x-axis in asc order. | SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title | nvbench |
CREATE TABLE table_27744 (
"Rd." text,
"Event" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Championship" text,
"Challenge" text,
"Production" text
) | Who made the challenge in the Australian Grand Prix? | SELECT "Challenge" FROM table_27744 WHERE "Event" = 'Australian Grand Prix' | wikisql |
CREATE TABLE table_name_97 (
attendance VARCHAR,
final VARCHAR
) | What was the attendance for the final quarter (1)? | SELECT attendance FROM table_name_97 WHERE final = "quarter (1)" | sql_create_context |
CREATE TABLE table_26686908_2 (
production VARCHAR,
rd VARCHAR
) | How many productions are shown for rd 2? | SELECT COUNT(production) FROM table_26686908_2 WHERE rd = "Rd 2" | 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 minimum age of unmarried patients who have pituitary bleed as their primary disease. | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "PITUITARY BLEED" | mimicsql_data |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location ... | can i have a list of all the thursday flights from BALTIMORE to ATLANTA that leave after 1300 | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... | atis |
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Order_Items (
... | A pie chart for what are the number of the descriptions of the service types with product price above 100? | SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description | nvbench |
CREATE TABLE table_name_97 (
bahia VARCHAR,
northeast_total VARCHAR
) | What is the value for Bahia when the Northeast total was 6747013? | SELECT bahia FROM table_name_97 WHERE northeast_total = "6747013" | sql_create_context |
CREATE TABLE table_28513 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" text
) | what type was joined in 1902 5? | SELECT "Type" FROM table_28513 WHERE "Joined" = '1902 5' | wikisql |
CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
... | Show the total number of passengers of each location in a bar chart. | SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location | nvbench |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | on last month/05, what was the average value of the heart rate of patient 27703? | SELECT AVG(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 = 27703)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'hear... | mimic_iii |
CREATE TABLE table_23014685_1 (
place_ VARCHAR,
_date VARCHAR,
area_damaged VARCHAR
) | What was the place and date that the Apartments area was damaged? | SELECT place_ & _date FROM table_23014685_1 WHERE area_damaged = "Apartments area" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | what is the number of patients whose insurance is private and procedure long title is other closed [endoscopic] biopsy of biliary duct or sphincter of oddi? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi" | mimicsql_data |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimme... | Bar graph to show meter_100 from different meter 400 | SELECT meter_400, meter_100 FROM swimmer | nvbench |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 自02.5.16起,至16.6.25至,医疗机构0244651在诊断疾病时,入院结果与出院结果不同的次数总共有多少 | SELECT COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '0244651' AND qtb.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2016-06-25' AND qtb.IN_DIAG_DIS_CD <> qtb.OUT_DIAG_DIS_CD UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '0244651' AND gyb.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2016-06-25' AND gyb.IN_DIAG_DIS_CD <> ... | css |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 看看这位患者入院时诊断出来的疾病编号和名称,编号是01456680839的医疗就诊 | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '01456680839' | css |
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE... | Give me a histogram to show the date and the amount for all the payments processed with Visa. | SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' | nvbench |
CREATE TABLE table_name_34 (
earnings_per_share__ INTEGER,
ebit__us_$m_ VARCHAR,
year_to_april VARCHAR,
revenue__us_$million_ VARCHAR
) | Count the Earnings per share ( ) in April smaller than 2012, a Revenue (US $million) of 432.6 and a EBIT (US $m) smaller than 150.5? | SELECT SUM(earnings_per_share__) AS ¢_ FROM table_name_34 WHERE year_to_april < 2012 AND revenue__us_$million_ = 432.6 AND ebit__us_$m_ < 150.5 | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TA... | Is there a project in class 545 ? | SELECT DISTINCT has_projects FROM course WHERE department = 'EECS' AND number = 545 | advising |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | What is the frequency with which SI 644 has been offered ? | SELECT COUNT(DISTINCT course_offering.offering_id) FROM course, course_offering WHERE course.course_id = course_offering.course_id AND course.department = 'SI' AND course.number = 644 | advising |
CREATE TABLE table_name_85 (
played INTEGER,
lost INTEGER
) | What is the lowest played with a lost bigger than 10? | SELECT MIN(played) FROM table_name_85 WHERE lost > 10 | sql_create_context |
CREATE TABLE table_23988 (
"Rd." real,
"Race Title" text,
"Circuit" text,
"Location" text,
"Date" text,
"Format" text,
"Winner" text,
"Team" text,
"Report" text
) | Was the result of the supercheap auto bathurst 1000 reported? | SELECT "Report" FROM table_23988 WHERE "Race Title" = 'Supercheap Auto Bathurst 1000' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | what would be patient 013-12480's monthly average weight since 115 months ago? | SELECT AVG(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-12480') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-115 month') GROUP BY STRFTIM... | eicu |
CREATE TABLE table_60581 (
"Year (Ceremony)" text,
"Original title" text,
"Film title used in nomination" text,
"Director" text,
"Result" text
) | What year has a original title of 'el tinte de la fama'? | SELECT "Year (Ceremony)" FROM table_60581 WHERE "Original title" = 'el tinte de la fama' | wikisql |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX 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 t... | 葛心怡这个患者之前在哪个医院看病啊 | SELECT mzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND per... | css |
CREATE TABLE table_74982 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
) | Which highest wins number had Kawasaki as a team, 95 points, and a year prior to 1981? | SELECT MAX("Wins") FROM table_74982 WHERE "Team" = 'kawasaki' AND "Points" = '95' AND "Year" < '1981' | wikisql |
CREATE TABLE manager (
Manager_ID int,
Name text,
Country text,
Working_year_starts text,
Age int,
Level int
)
CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text,
From text,
... | Show the countries that have managers of age above 50 or below 46, and count them by a bar chart, and sort in ascending by the bar. | SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country | nvbench |
CREATE TABLE table_36827 (
"Title" text,
"Genre" text,
"C=64" text,
"ZX Spectrum" text,
"Others" text,
"Year" real,
"Format" text
) | How many years have a Title of kriegspiel? | SELECT COUNT("Year") FROM table_36827 WHERE "Title" = 'kriegspiel' | 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 diagnoses (
... | what is drug name and drug route of drug code epo2i? | SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "EPO2I" | mimicsql_data |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE time_zone (
time_zone_code t... | show me all flights from KANSAS CITY to CHICAGO on 6 16 arriving around 7 o'clock in the evening | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((flight.arrival_time <= 1930 AND flight.arrival_time >= 1830) AND date_day.day_number = 16 AND date_day.month_number = 6 AND date_day.year = 19... | atis |
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, show me about the correlation between code and code , and group by attribute headquarter in a scatter chart. | SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE table_22183 (
"Year" real,
"Car number" real,
"Start" real,
"Qual. speed" text,
"Speed rank" real,
"Finish" real,
"Laps completed" real,
"Laps led" real,
"Race status" text,
"Chassis" text
) | How many years was he car number 92? | SELECT COUNT("Speed rank") FROM table_22183 WHERE "Car number" = '92' | wikisql |
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 ... | 列出患者韦坚秉的检验报告单日期在零一年二月二十三日之前的所对应的门诊就诊的流水号 | 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 NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2001-02-23') | css |
CREATE TABLE t_kc21 (
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,
... | 患者潘红雪的医疗记录中有哪几次的药品消费金不少于2937.59元的医疗就诊编号 | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '潘红雪' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 2937.59) | css |
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 wdmzjzjlb (
HXPLC number,
HZX... | 在2012年8月24日到2020年5月4日内病人尤云霞被开出的所有检验报告单的检验报告单号都有哪些? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '尤... | 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 average age of female patients diagnosed primarily for celo-vessicle fistula? | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "CELO-VESSICLE FISTULA" | mimicsql_data |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Suggeste... | find candidates for Revival badge. find questions older than 30 days which have no answers | SELECT Id AS "post_link", Score, ViewCount AS Views, AnswerCount AS Answers, CreationDate, Tags FROM Posts WHERE AcceptedAnswerId IS NULL AND PostTypeId = 1 AND CreationDate < CURRENT_TIMESTAMP() - 30 AND ClosedDate IS NULL AND NOT EXISTS(SELECT * FROM Posts AS p WHERE p.ParentId = Posts.Id AND p.PostTypeId = 2) AND Ta... | sede |
CREATE TABLE table_name_59 (
play VARCHAR,
base VARCHAR,
company VARCHAR
) | What is the Athens Base play with Dance Theatre Roes Company? | SELECT play FROM table_name_59 WHERE base = "athens" AND company = "dance theatre roes" | sql_create_context |
CREATE TABLE table_13083 (
"Date (dd.mm.yyyy)" text,
"Soviet Unit" text,
"Aircraft flown" text,
"Enemy Aircraft" text,
"Axis Unit" text
) | What was the enemy aircraft on 14.09.1942, when the Soviet Unit was 437 iap? | SELECT "Enemy Aircraft" FROM table_13083 WHERE "Soviet Unit" = '437 iap' AND "Date (dd.mm.yyyy)" = '14.09.1942' | wikisql |
CREATE TABLE table_51119 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Where does Bob Tway Place? | SELECT "Place" FROM table_51119 WHERE "Player" = 'bob tway' | wikisql |
CREATE TABLE table_name_84 (
opponents VARCHAR,
date VARCHAR,
score VARCHAR,
competition VARCHAR
) | Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents? | SELECT opponents FROM table_name_84 WHERE score = "2-1" AND competition = "pl" AND date = "december 22, 2006" | sql_create_context |
CREATE TABLE table_6543 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | Name the total numbe rof years for gaby weissen mireille kosmala | SELECT COUNT("Year") FROM table_6543 WHERE "Women's doubles" = 'gaby weissen mireille kosmala' | wikisql |
CREATE TABLE table_name_29 (
played VARCHAR,
goal_difference VARCHAR,
club VARCHAR
) | Which Played number had a goal difference of more than 0 when the club was Valencia CF? | SELECT COUNT(played) FROM table_name_29 WHERE goal_difference > 0 AND club = "valencia cf" | sql_create_context |
CREATE TABLE table_name_96 (
nationality VARCHAR,
player VARCHAR,
position VARCHAR
) | What was the nationality of five-eighth player Darren Lockyer? | SELECT nationality FROM table_name_96 WHERE player = "darren lockyer" AND position = "five-eighth" | sql_create_context |
CREATE TABLE table_name_42 (
weight VARCHAR,
club VARCHAR
) | What is the weight of the player from the vk primorac kotor club? | SELECT weight FROM table_name_42 WHERE club = "vk primorac kotor" | sql_create_context |
CREATE TABLE table_204_575 (
id number,
"place" number,
"position" text,
"number" number,
"name" text,
"league one" number,
"fa cup" number,
"league cup" number,
"football league trophy" number,
"total" number
) | what was the average number of assists in league one ? | SELECT AVG("league one") FROM table_204_575 | squall |
CREATE TABLE table_29477 (
"Team" text,
"Outgoing head coach" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" real,
"Incoming head coach" text,
"Date of appointment" text
) | What is the team with the date of vacancy 8 dec 2010? | SELECT "Team" FROM table_29477 WHERE "Date of vacancy" = '8 Dec 2010' | wikisql |
CREATE TABLE table_name_30 (
pages INTEGER,
vol__number VARCHAR,
isbn VARCHAR
) | How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have? | SELECT SUM(pages) FROM table_name_30 WHERE vol__number < 8 AND isbn = "1-40122-892-5" | sql_create_context |
CREATE TABLE city (
city_id number,
city text,
hanzi text,
hanyu_pinyin text,
regional_population number,
gdp number
)
CREATE TABLE hosting_city (
year number,
match_id number,
host_city text
)
CREATE TABLE temperature (
city_id number,
jan number,
feb number,
mar n... | Find the city that hosted some events in the most recent year. What is the id of this city? | SELECT host_city FROM hosting_city ORDER BY year DESC LIMIT 1 | spider |
CREATE TABLE table_22670216_1 (
location VARCHAR,
winning_driver VARCHAR,
track VARCHAR
) | If the track is the Wisconsin State Fair Park Speedway and the winning driver is Wally Dallenbach, what was the location? | SELECT location FROM table_22670216_1 WHERE winning_driver = "Wally Dallenbach" AND track = "Wisconsin State Fair Park Speedway" | sql_create_context |
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 treatment (
... | what is the three most frequent medication that was prescribed in the same month to the patients aged 40s after they had been diagnosed with bone fracture(s) - ribs, since 5 years ago? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - ribs' AND DATETIME(diagnosis.di... | eicu |
CREATE TABLE club (
club_id number,
name text,
region text,
start_year text
)
CREATE TABLE competition_result (
competition_id number,
club_id_1 number,
club_id_2 number,
score text
)
CREATE TABLE competition (
competition_id number,
year number,
competition_type text,
... | What is the total number of clubs? | SELECT COUNT(*) FROM club | spider |
CREATE TABLE table_26352332_4 (
years_produced VARCHAR,
cylinder_layout VARCHAR
) | The cylinder layout v8 is produced in what years? | SELECT years_produced FROM table_26352332_4 WHERE cylinder_layout = "V8" | sql_create_context |
CREATE TABLE table_17616 (
"Rank" real,
"Fastest time (s)" text,
"Wind (m/s)" text,
"Athlete" text,
"Nation" text,
"Date" text,
"Location" text
) | What is the athlete from Edwardsville? | SELECT "Athlete" FROM table_17616 WHERE "Location" = 'Edwardsville' | wikisql |
CREATE TABLE table_51242 (
"Year" text,
"Name" text,
"Film" text,
"Role" text,
"Status" text
) | What year did Miyoshi Umeki make a film? | SELECT "Year" FROM table_51242 WHERE "Name" = 'miyoshi umeki' | wikisql |
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 who had incision of vessel (aorta) have an unspecified death status? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Incision of vessel, aorta" | mimicsql_data |
CREATE TABLE table_28789 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Patient Portrayer" text,
"Original air date" text,
"Production code" text
) | What is the original air date of the episode with the title 'Monica Wilder'? | SELECT "Original air date" FROM table_28789 WHERE "Title" = 'Monica Wilder' | wikisql |
CREATE TABLE table_66220 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
) | what is the round when the pick # is less than 236 and the position is offensive guard? | SELECT AVG("Round") FROM table_66220 WHERE "Pick #" < '236' AND "Position" = 'offensive guard' | wikisql |
CREATE TABLE table_name_10 (
team__number2 VARCHAR
) | Tell me the 1st leg for antwerp bc | SELECT 1 AS st_leg FROM table_name_10 WHERE team__number2 = "antwerp bc" | sql_create_context |
CREATE TABLE table_13383 (
"Draw" real,
"Language" text,
"Artist" text,
"Song" text,
"English translation" text,
"Place" real,
"Points" real
) | Which artist speaks croatian? | SELECT "Artist" FROM table_13383 WHERE "Language" = 'croatian' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program (
program_id int,
name varchar... | How many professors teach AAPTIS 838 in Winter 2006 ? | 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 = 'AAPTIS' AND course.number = 838 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.off... | advising |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number... | Active Meta Stack Overflow Users. | SELECT COUNT(*) FROM Users WHERE LastAccessDate >= '2018-07-26' | sede |
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... | 名叫多潘立酮片在医疗就诊47484689413中多久用一次及一次用量是多少? | SELECT t_kc22.USE_FRE, t_kc22.EACH_DOSAGE FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '47484689413' AND t_kc22.SOC_SRT_DIRE_NM = '多潘立酮片' | css |
CREATE TABLE table_name_76 (
metacritic VARCHAR,
gamerankings VARCHAR,
year_released VARCHAR,
platform VARCHAR
) | What is the Metacritic released after 2005, with a Platform of playstation 3 and a GameRankings of 84.44%? | SELECT metacritic FROM table_name_76 WHERE year_released > 2005 AND platform = "playstation 3" AND gamerankings = "84.44%" | sql_create_context |
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperfield (
fieldid int,
pape... | How many publications were added to the Cell journal this year ? | SELECT DISTINCT COUNT(paper.paperid) FROM journal, paper, paperkeyphrase WHERE journal.journalname = 'Cell' AND paper.journalid = journal.journalid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016 | scholar |
CREATE TABLE table_name_50 (
outcome VARCHAR,
surface VARCHAR,
score VARCHAR
) | Which outcome has a Surface of clay and a Score of 4 6, 7 5, 2 6? | SELECT outcome FROM table_name_50 WHERE surface = "clay" AND score = "4–6, 7–5, 2–6" | 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... | how many patients whose discharge location is left against medical advi and diagnoses short title is blood in stool? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND diagnoses.short_title = "Blood in stool" | mimicsql_data |
CREATE TABLE table_54593 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
) | How many attended tie number 1? | SELECT SUM("Attendance") FROM table_54593 WHERE "Tie no" = '1' | wikisql |
CREATE TABLE table_48149 (
"Missouri vs." text,
"Overall Record" text,
"at Columbia" text,
"at Opponent's Venue" text,
"at Neutral Site" text,
"Last 5 Meetings" text,
"Last 10 Meetings" text,
"Current Streak" text,
"Since Joining SEC" text
) | What's the opponent's venue result when the opponent is tennessee? | SELECT "at Opponent's Venue" FROM table_48149 WHERE "Missouri vs." = 'tennessee' | wikisql |
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... | 列出从06年5月31日开始2008年2月24日结束袁乐英患者所有检验结果指标记录的质检人为水嘉淑的检验指标流水号是多少? | SELECT jyjgzbb.JYZBLSH 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 = ... | css |
CREATE TABLE table_name_47 (
spoofed_title VARCHAR,
date VARCHAR
) | Which Spoofed title is from February 1998? | SELECT spoofed_title FROM table_name_47 WHERE date = "february 1998" | sql_create_context |
CREATE TABLE airlines (
alid number,
name text,
iata text,
icao text,
callsign text,
country text,
active text
)
CREATE TABLE routes (
rid number,
dst_apid number,
dst_ap text,
src_apid number,
src_ap text,
alid number,
airline text,
codeshare text
)
CREATE ... | What is the total number of airlines? | SELECT COUNT(*) FROM airlines | spider |
CREATE TABLE table_name_72 (
name VARCHAR,
location VARCHAR
) | Which is located in Nigeria? | SELECT name FROM table_name_72 WHERE location = "nigeria" | sql_create_context |
CREATE TABLE table_12280 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What date was the game with the away team york city? | SELECT "Date" FROM table_12280 WHERE "Away team" = 'york city' | wikisql |
CREATE TABLE table_204_36 (
id number,
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" number,
"record" text
) | how many games did the hoyas score 50 or more points ? | SELECT COUNT(*) FROM table_204_36 WHERE "result" >= 50 | squall |
CREATE TABLE table_10647401_1 (
week INTEGER,
stadium VARCHAR
) | What week corresponds to the last one to be played at the memorial stadium? | SELECT MAX(week) FROM table_10647401_1 WHERE stadium = "Memorial stadium" | sql_create_context |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
... | flights from LOS ANGELES to PITTSBURGH | 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 = 'LOS ANGELES' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PI... | atis |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | how many single patients are of hispanic or latino-puertorican ethnicity? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" | mimicsql_data |
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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(4... | For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by time. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE table_name_56 (
title VARCHAR,
director VARCHAR,
release_date VARCHAR
) | Which title was directed by chuck jones and released on 1958-04-12? | SELECT title FROM table_name_56 WHERE director = "chuck jones" AND release_date = "1958-04-12" | sql_create_context |
CREATE TABLE table_name_58 (
crowd INTEGER,
home_team VARCHAR
) | How many people attended the home game for South Melbourne? | SELECT SUM(crowd) FROM table_name_58 WHERE home_team = "south melbourne" | sql_create_context |
CREATE TABLE table_61744 (
"Conflicts prior to Israel's independence" text,
"Military deaths" text,
"Civilian deaths" text,
"Total deaths" text,
"Military and/or Civilian wounded" text,
"Total casualties" text
) | How many military deaths were there when there were 1,200+ military and/or civilian wounded? | SELECT "Military deaths" FROM table_61744 WHERE "Military and/or Civilian wounded" = '1,200+' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | when was the last time until 1749 days ago that patient 006-66713 has had a p.o. intake? | 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 = '006-66713')) AND intakeoutput.cellpath LIKE '%intake%... | eicu |
CREATE TABLE Departments (
department_id INTEGER,
dept_store_id INTEGER,
department_name VARCHAR(80)
)
CREATE TABLE Suppliers (
supplier_id INTEGER,
supplier_name VARCHAR(80),
supplier_phone VARCHAR(80)
)
CREATE TABLE Supplier_Addresses (
supplier_id INTEGER,
address_id INTEGER,
da... | Draw a bar chart of product type code versus minimal product price, display by the total number from low to high please. | SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY MIN(product_price) | nvbench |
CREATE TABLE table_64444 (
"Rank" real,
"Player" text,
"County" text,
"Tally" text,
"Total" real,
"Opposition" text
) | Who was the opposition for the player who has a total of 10 points? | SELECT "Opposition" FROM table_64444 WHERE "Total" = '10' | wikisql |
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... | 哪些工号及姓名的医务人员在患者03603176就诊过程中为他检测C反应蛋白的,时间是从0一年三月九日到0八年三月十二日 | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE jyjgzbb.JYRQ BETWEEN '2001-03-09' AND '2008-03-1... | css |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
value... | what are the five frequently ordered drugs for patients that received cont inv mec ven 96+ hrs previously within the same hospital visit, in 2102? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number... | Year wise total number of posts. | SELECT * FROM Posts WHERE CreationDate BETWEEN '2015-12-01 00:00:01' AND '2015-12-31 11:59:59' | sede |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time... | Fastest Guns in the West. Users with fastest response time | SELECT a.OwnerUserId AS "user_link", CAST(DATE(0, 'AVG(CAST((JULIANDAY(CreationDate) - JULIANDAY(q.CreationDate)) * 86400.0 AS INTEGER)) SECOND') AS TIMESTAMP), COUNT(*) FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE a.PostTypeId = 2 AND NOT a.OwnerUserId IS NULL AND (q.OwnerUserId IS NULL OR q.OwnerU... | sede |
CREATE TABLE qtb (
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... | 能知道患者窦湛蓝在2004.12.7到2017.9.13这段时间看病最主要挂哪个医生的号吗 | SELECT qtb.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_NM = '窦湛蓝' AND qtb.IN_HOSP_DATE BETWEEN '2004-12-07' AND '2017-09-13' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_NM = '窦湛蓝' AND gyb.IN_HOSP_DATE BETW... | css |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 看一下医院6776631全部医疗记录中,在不同的科室名和入院诊断编号下的患者的平均岁数有多大 | SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_CD, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6776631' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_CD UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.IN_DIAG_DIS_CD, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '67766... | css |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilege... | Potential voters in mod election. | SELECT COUNT(Id) FROM Users WHERE Reputation >= 150 | sede |
CREATE TABLE table_380 (
"Member" text,
"Electorate" text,
"Province" text,
"MPs term" text,
"Election date" text
) | what's the province where member is dingley brittin category:articles with hcards | SELECT "Province" FROM table_380 WHERE "Member" = 'Dingley Brittin Category:Articles with hCards' | wikisql |
CREATE TABLE table_57926 (
"Episode" text,
"Air Date" text,
"Rating" real,
"Share" real,
"Rating/Share 18\u201349" text,
"Viewers (m)" real,
"Timeslot Rank" real,
"Night Rank" text,
"Overall Rank" real
) | What is the overall rank with rating smaller than 8.2 and rating share of 4.5/11? | SELECT COUNT("Overall Rank") FROM table_57926 WHERE "Rating/Share 18\u201349" = '4.5/11' AND "Rating" < '8.2' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.