context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_22905 (
"Carrier" text,
"Standard" text,
"Frequency" text,
"(down)" text,
"(up)" text,
"Launch date (dd.mm.yyyy)" text
) | whare are al of the launche dates where th carrier is orange and the up is 5.76 mbit/s | SELECT "Launch date (dd.mm.yyyy)" FROM table_22905 WHERE "(up)" = '5.76 Mbit/s' AND "Carrier" = 'Orange' | wikisql |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
... | what is the unabbreviated version of the nephritis nos in oth dis? | SELECT d_icd_diagnoses.long_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'nephritis nos in oth dis' UNION SELECT d_icd_procedures.long_title FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'nephritis nos in oth dis' | mimic_iii |
CREATE TABLE table_204_106 (
id number,
"year" number,
"title" text,
"image" text,
"dimensions" text,
"collection" text,
"comments" text
) | what was the title of terence cuneo 's first work ? | SELECT "title" FROM table_204_106 ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | count the number of black/haitian patients who were injected oxazolidinone. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND procedures.short_title = "Injection oxazolidinone" | mimicsql_data |
CREATE TABLE table_name_93 (
opponent VARCHAR,
march VARCHAR,
game VARCHAR
) | who is the opponent after march 21 and the game is 75? | SELECT opponent FROM table_name_93 WHERE march > 21 AND game = 75 | sql_create_context |
CREATE TABLE table_42531 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" real,
"Time" text,
"Jockey" text,
"Winner/2nd" text
) | What was the result of the race that was a 2000m distance? | SELECT "Result" FROM table_42531 WHERE "Distance" = '2000m' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... | View count, raw, by Post Type. | SELECT CASE WHEN (GROUPING(pt.Name) = 1) THEN 'Grand Total:' ELSE COALESCE(pt.Name, 'UNKNOWN') END AS "post_type", SUM(COALESCE(1.0 * p.ViewCount, 0)) AS Views FROM Posts AS p LEFT JOIN PostTypes AS pt ON pt.Id = p.PostTypeId GROUP BY pt.Name WITH ROLLUP | sede |
CREATE TABLE table_20941 (
"Year" text,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
) | What was the team's playoff status in 2011? | SELECT "Playoffs" FROM table_20941 WHERE "Year" = '2011' | wikisql |
CREATE TABLE table_6482 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | What is the name of the visitor on January 24? | SELECT "Visitor" FROM table_6482 WHERE "Date" = 'january 24' | wikisql |
CREATE TABLE table_name_71 (
region VARCHAR,
japanese VARCHAR
) | What region has the symbol ? | SELECT region FROM table_name_71 WHERE japanese = "八尾" | sql_create_context |
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank i... | Draw a bar chart of main industry versus total number of market value, I want to show by the X-axis from low to high. | SELECT Main_Industry, SUM(Market_Value) FROM company GROUP BY Main_Industry ORDER BY Main_Industry | nvbench |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | calculate the number of patients who underwent a laboratory test for cd4 cells, percent since 2100. | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'cd4 cells, percent') AND STRFTIME('%y', labevents.charttime) >= '2100') | mimic_iii |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | What is the number of prerequisites for RCNSCI 419 that I have completed ? | SELECT COUNT(DISTINCT COURSE_1.department, COURSE_0.number) FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, student_record WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'RCNSCI' AND COURSE_1.number = 419 AN... | advising |
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 swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_40... | Bar chart x axis nationality y axis mean meter 100, rank from low to high by the bars. | SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality ORDER BY Nationality | nvbench |
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
)
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real... | What are the id and name of the mountains that have at least 2 photos Show bar chart, and list by the bar in descending please. | SELECT T1.name, T1.id FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id ORDER BY T1.name DESC | nvbench |
CREATE TABLE table_name_91 (
lost INTEGER,
points INTEGER
) | Which Lost has Points larger than 13? | SELECT AVG(lost) FROM table_name_91 WHERE points > 13 | sql_create_context |
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 who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time, and order total number in asc order. | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(SALARY) | nvbench |
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 diagnoses short title and diagnoses long title of diagnoses icd9 code 7596? | SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "7596" | mimicsql_data |
CREATE TABLE table_name_66 (
week VARCHAR,
attendance VARCHAR
) | What week had an attendance of 27,262? | SELECT week FROM table_name_66 WHERE attendance = "27,262" | sql_create_context |
CREATE TABLE made_by (
id int,
msid int,
pid int
)
CREATE TABLE directed_by (
id int,
msid int,
did int
)
CREATE TABLE classification (
id int,
msid int,
gid int
)
CREATE TABLE tv_series (
sid int,
title text,
release_year int,
num_of_seasons int,
num_of_episod... | Find all actors born in ' Los Angeles | SELECT name FROM actor WHERE birth_city = 'Los Angeles' | imdb |
CREATE TABLE fgwyjzb (
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,
... | 病患58275827在医院6736860中去名称中不包含儿保科的就诊科室做过的医疗就诊记录有多少 | SELECT * FROM gwyjzb WHERE gwyjzb.PERSON_ID = '58275827' AND gwyjzb.MED_SER_ORG_NO = '6736860' AND NOT gwyjzb.MED_ORG_DEPT_NM LIKE '%儿保科%' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '58275827' AND fgwyjzb.MED_SER_ORG_NO = '6736860' AND NOT fgwyjzb.MED_ORG_DEPT_NM LIKE '%儿保科%' | css |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
i... | tell me the patient ids who are diagnosed with increased intracranial pressure in 2102. | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'increased intracranial pressure' AND STRFTIME('%y', diagnosis.diagnosistime) = '2102') | eicu |
CREATE TABLE table_24732149_2 (
circuit VARCHAR,
round VARCHAR
) | What is the circuit of round 5? | SELECT circuit FROM table_24732149_2 WHERE round = 5 | sql_create_context |
CREATE TABLE table_68359 (
"Minister" text,
"Party" text,
"Governments" text,
"Term start" text,
"Term end" text
) | When did the term end for the term that had government 27 and Minister Tzachi Hanegbi? | SELECT "Term end" FROM table_68359 WHERE "Governments" = '27' AND "Minister" = 'tzachi hanegbi' | wikisql |
CREATE TABLE table_204_821 (
id number,
"speed [km/h (mph)]" text,
"train" text,
"type" text,
"location" text,
"date" text,
"comments" text
) | what was the date of the first speed recorded that was over 450 km/h ? | SELECT "date" FROM table_204_821 WHERE "speed [km/h (mph)]" > 450 ORDER BY "date" LIMIT 1 | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | give me the number of patients whose admission location is transfer from hosp/extram and procedure long title is implant of pulsation balloon? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND procedures.long_title = "Implant of pulsation balloon" | mimicsql_data |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit... | tell me what the total output on 12/18/2105 is for patient 28443. | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443)) AND STRFTIME('%y-%m-%d', outputevents.charttime) = '2105-12-18' | mimic_iii |
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... | 列出患者沈伟祺门诊诊断名称包含颅脑的在医院8930086中有什么门诊就诊记录? | SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb 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 WHERE person_info.XM = '沈伟祺' AND hz_info.YLJGDM = '8930086' AND wdmzjzjlb.JZZDSM LIKE '%颅脑%' UNION SELECT * FROM person_info JOIN h... | css |
CREATE TABLE table_66834 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | What is the qual when there are 125 laps? | SELECT "Qual" FROM table_66834 WHERE "Laps" = '125' | wikisql |
CREATE TABLE table_41092 (
"Tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text... | What is 1997, when 2003 is 0 / 4? | SELECT "1997" FROM table_41092 WHERE "2003" = '0 / 4' | wikisql |
CREATE TABLE Medication (
Code VARCHAR,
name VARCHAR
)
CREATE TABLE patient (
SSN VARCHAR
)
CREATE TABLE Prescribes (
patient VARCHAR,
Medication VARCHAR
) | Find the number of patients who are not using the medication of Procrastin-X. | SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X') | sql_create_context |
CREATE TABLE table_31480 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
) | List the rider for the doncaster handicap compeition. | SELECT "Jockey" FROM table_31480 WHERE "Race" = 'Doncaster Handicap' | wikisql |
CREATE TABLE table_203_689 (
id number,
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
) | the least amount of points scored by phoenix during the season is ... | SELECT MIN("score") FROM table_203_689 | squall |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | what were the meds that were added today to patient 016-22566 compared to that yesterday? | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '016-22566') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medica... | eicu |
CREATE TABLE table_name_38 (
gold VARCHAR,
rank VARCHAR
) | What is Gold, when Rank is 7? | SELECT gold FROM table_name_38 WHERE rank = "7" | sql_create_context |
CREATE TABLE table_name_63 (
weight VARCHAR,
shirt_no VARCHAR,
height VARCHAR
) | Shirt number of 18, and a Height larger than 195 has how much weight? | SELECT COUNT(weight) FROM table_name_63 WHERE shirt_no = 18 AND height > 195 | 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... | Provide the list of patients younger than 68 years who have lab test item id 51221. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "68" AND lab.itemid = "51221" | mimicsql_data |
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,
... | 列出医院0798538所有的个人自费与医疗费总额在医疗就诊记录中的比值的最小值是什么,在不同科室名称和出院诊断疾病编码下,并升序排序? | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD, MIN(t_kc24.PER_EXP) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '0798538' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_... | css |
CREATE TABLE table_name_60 (
suburb VARCHAR,
roll VARCHAR
) | What is the name of the suburb with a roll of 741? | SELECT suburb FROM table_name_60 WHERE roll = 741 | sql_create_context |
CREATE TABLE table_2140071_10 (
coach VARCHAR,
premier_date VARCHAR
) | Name the coach for may 20, 2010 | SELECT coach FROM table_2140071_10 WHERE premier_date = "May 20, 2010" | sql_create_context |
CREATE TABLE table_247955_2 (
date VARCHAR,
no VARCHAR
) | What was the date for no. 7? | SELECT date FROM table_247955_2 WHERE no = 7 | sql_create_context |
CREATE TABLE table_name_52 (
goals INTEGER,
assists VARCHAR,
apps VARCHAR
) | What is the total goals with 12 assists, and less than 291 apps? | SELECT SUM(goals) FROM table_name_52 WHERE assists = 12 AND apps < 291 | sql_create_context |
CREATE TABLE table_name_5 (
week INTEGER,
opponent VARCHAR
) | What is the highest week that was played against the Minnesota Vikings? | SELECT MAX(week) FROM table_name_5 WHERE opponent = "minnesota vikings" | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | Number of questions in MSE. | SELECT COUNT(*) AS count FROM Posts WHERE PostTypeId = 1 | sede |
CREATE TABLE table_10140 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who was the home team when the away team scored 10.15 (75)? | SELECT "Home team" FROM table_10140 WHERE "Away team score" = '10.15 (75)' | 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 whose admission year is less than 2166 and lab test name is absolute cd4 count? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2166" AND lab.label = "Absolute CD4 Count" | mimicsql_data |
CREATE TABLE table_name_18 (
driver VARCHAR,
year VARCHAR
) | What is the name of the driver in 1955? | SELECT driver FROM table_name_18 WHERE year = "1955" | 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... | find the primary disease and lab test fluid of subject id 2560. | SELECT demographic.diagnosis, lab.fluid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | For those employees who did not have any job in the past, visualize a scatter chart about the correlation between manager_id and department_id . | SELECT MANAGER_ID, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | 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 CloseAsOffTopicReasonTypes (
Id number,
IsUniversal... | Dubai users rank with reputation. | SELECT Ranking = ROW_NUMBER() OVER (ORDER BY Reputation DESC), * FROM Users WHERE Location LIKE '%Dubai%' OR Location LIKE '%dubai%' ORDER BY Reputation DESC | sede |
CREATE TABLE table_name_51 (
bronze INTEGER,
nation VARCHAR,
silver VARCHAR
) | Wha is the average number of bronze of hungary, which has less than 1 silver? | SELECT AVG(bronze) FROM table_name_51 WHERE nation = "hungary" AND silver < 1 | sql_create_context |
CREATE TABLE table_24654 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | Who was playing when the score was 5 7, 6 7 (4 7)? | SELECT "Opponents" FROM table_24654 WHERE "Score" = '5–7, 6–7 (4–7)' | wikisql |
CREATE TABLE table_25468520_1 (
theme VARCHAR,
date_of_issue VARCHAR
) | What is the theme when the date of issue is 11 january 2010? | SELECT theme FROM table_25468520_1 WHERE date_of_issue = "11 January 2010" | 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... | 在00年6月14日到2015年5月27日之内名叫沈景辉的患者被开出的所有检验报告单的检验报告单号都有什么? | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.person_info_XM = '沈景辉' AND jybgb.BGRQ BETWEEN '2000-06-14' AND '2015-05-27' ... | css |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | i need a flight from DENVER to WASHINGTON on wednesday | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 23 AND date_day.month_number = 4 AN... | atis |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
... | Tags which no longer exists. | WITH tagshistory_cte AS (SELECT Id AS phid, REPLACE(value, '>', '') AS TagName FROM PostHistory JOIN LATERAL STRING_SPLIT(Text, '<') WHERE PostHistoryTypeId IN (3, 6, 9) AND LENGTH(value) > 0) SELECT DISTINCT (th.TagName) FROM tagshistory_cte AS th WHERE (th.TagName NOT IN (SELECT TagName FROM Tags)) ORDER BY th.TagNam... | sede |
CREATE TABLE table_name_89 (
round INTEGER,
place VARCHAR
) | Name the average round for jacksonville | SELECT AVG(round) FROM table_name_89 WHERE place = "jacksonville" | sql_create_context |
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(... | Visualize a bar chart for what is the average salary for each job title?, and sort by the Y from high to low. | SELECT JOB_TITLE, AVG(SALARY) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID GROUP BY T2.JOB_TITLE ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE table_name_99 (
time_retired VARCHAR,
constructor VARCHAR,
laps VARCHAR
) | What is the Time/Retired when lotus - ford was constructor and the laps were less than 17? | SELECT time_retired FROM table_name_99 WHERE constructor = "lotus - ford" AND laps < 17 | sql_create_context |
CREATE TABLE table_53295 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many fans were at Essendon? | SELECT COUNT("Crowd") FROM table_53295 WHERE "Home team" = 'essendon' | wikisql |
CREATE TABLE table_61839 (
"Air Date" text,
"Rating" text,
"18-49" text,
"Viewers" text,
"Weekly Winner" text
) | What is 18-49, when Weekly Winner is 'Youth Counselor Justin Meece'? | SELECT "18-49" FROM table_61839 WHERE "Weekly Winner" = 'youth counselor justin meece' | wikisql |
CREATE TABLE table_4242 (
"Train number" real,
"Train name" text,
"Origin" text,
"Destination" text,
"Service" text,
"Route/Via." text
) | What is the destination of the route kulitthurai,neyyattinkara? | SELECT "Destination" FROM table_4242 WHERE "Route/Via." = 'Kulitthurai,Neyyattinkara' | wikisql |
CREATE TABLE table_name_43 (
call_sign VARCHAR,
erp_w VARCHAR,
frequency_mhz VARCHAR
) | Which call sign, broadcast at less than 103.5MHz, has an ERP W of 50? | SELECT call_sign FROM table_name_43 WHERE erp_w = 50 AND frequency_mhz < 103.5 | sql_create_context |
CREATE TABLE table_59175 (
"Week 1" text,
"Week 2" text,
"Week 3" text,
"Week 4" text,
"Week 5" text
) | When Cathi O'Malley was featured in Week 3, who was the cyber girl for Week 5? | SELECT "Week 5" FROM table_59175 WHERE "Week 3" = 'cathi o''malley' | wikisql |
CREATE TABLE table_3261 (
"#" real,
"Chief Justice" text,
"Date of birth" text,
"Appointed by" text,
"Date of appointment" text,
"Age at appointment" text,
"Date of retirement" text,
"Age at retirement" text,
"Date of death" text,
"Lifespan" text
) | What are the dates of death of those politicians whose date of birth 1938-08-30 30 august 1938? | SELECT COUNT("Date of death") FROM table_3261 WHERE "Date of birth" = '1938-08-30 30 August 1938' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUser... | Closed questions with negative score favorited only by the OP. | SELECT Posts.Id AS "post_link", Posts.FavoriteCount, Posts.Score, Posts.CreationDate, Votes.UserId AS "user_link" FROM Votes JOIN Posts ON (Posts.Id = Votes.PostId) WHERE Posts.FavoriteCount = 1 AND Posts.Score < 0 AND NOT Posts.ClosedDate IS NULL AND VoteTypeId = 5 AND Posts.PostTypeId = 1 AND Posts.OwnerUserId = Vote... | sede |
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... | 五氟利多片(糖衣)在医疗机构7252912的检查记录有多少? | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7252912' AND t_kc22.SOC_SRT_DIRE_NM = '五氟利多片(糖衣)' | 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 jybgb (
BBCJBW text,
BBDM tex... | 那些已经被门诊诊断为维生素B缺乏病的病患们的检测指标514736的平均数值以及最值都是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDSM = '维生素B缺乏病' AND jyjgzbb.JCZBDM = '... | css |
CREATE TABLE table_77401 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | What is Place, when Country is 'United States', and when Player is 'Lee Trevino'? | SELECT "Place" FROM table_77401 WHERE "Country" = 'united states' AND "Player" = 'lee trevino' | wikisql |
CREATE TABLE table_name_92 (
city VARCHAR,
gross_revenue__2011_ VARCHAR
) | Which city had a gross revenue in 2011 of $739,578? | SELECT city FROM table_name_92 WHERE gross_revenue__2011_ = "$739,578" | sql_create_context |
CREATE TABLE table_59780 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
) | What Outgoing manager left at his end of tenure as caretaker and was Replaced by Jesper Hansen? | SELECT "Outgoing manager" FROM table_59780 WHERE "Manner of departure" = 'end of tenure as caretaker' AND "Replaced by" = 'jesper hansen' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
... | tell me the three most common intakes in 2100? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE STRFTIME('%y', inputevents_cv.charttime) = '2100' GROUP BY inputevents_cv.itemid) AS t1 WHERE t1.c1 <= 3) | mimic_iii |
CREATE TABLE table_name_34 (
gold INTEGER,
rank VARCHAR,
silver VARCHAR
) | How many Gold for the Nation in Rank 15 with 0 Silver? | SELECT MAX(gold) FROM table_name_34 WHERE rank = "15" AND silver > 0 | sql_create_context |
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... | how many jewish patients were admitted to the hospital before the year 2146? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "JEWISH" AND demographic.admityear < "2146" | mimicsql_data |
CREATE TABLE table_66329 (
"Stadium" text,
"Capacity" real,
"City" text,
"Country" text,
"Home team/s" text,
"Closed (as a RL stadium)" real
) | What city has the home team of the brisbane broncos? | SELECT "City" FROM table_66329 WHERE "Home team/s" = 'brisbane broncos' | wikisql |
CREATE TABLE table_name_95 (
league_goals INTEGER,
league_apps VARCHAR,
league_cup_goals VARCHAR
) | What is the league goals when the league cup goals is less than 0 and 16 (1) league apps? | SELECT AVG(league_goals) FROM table_name_95 WHERE league_apps = "16 (1)" AND league_cup_goals < 0 | sql_create_context |
CREATE TABLE table_name_9 (
athlete VARCHAR
) | What is the 2.15 for Tom Parsons? | SELECT 215 FROM table_name_9 WHERE athlete = "tom parsons" | sql_create_context |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_descriptio... | airlines that fly to MIAMI from NEW YORK on friday | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIAMI' AND date_day.day_number = 25 AND date_day.month_numbe... | atis |
CREATE TABLE member (
Member_ID int,
Card_Number text,
Name text,
Hometown text,
Level int
)
CREATE TABLE branch (
Branch_ID int,
Name text,
Open_year text,
Address_road text,
City text,
membership_amount text
)
CREATE TABLE membership_register_branch (
Member_ID int,
... | Show all branch names with the number of members in each branch registered after 2015 with a bar chart, and list in descending by the total number. | SELECT Name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.Branch_ID = T2.Branch_ID WHERE T1.Register_Year > 2015 GROUP BY T2.Branch_ID ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_78393 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | What was the date that ended in a record of 8-25-7? | SELECT "Date" FROM table_78393 WHERE "Record" = '8-25-7' | wikisql |
CREATE TABLE table_56387 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" text
) | Which manufacturer has 23 laps and a time of +45.195? | SELECT "Manufacturer" FROM table_56387 WHERE "Laps" = '23' AND "Time/Retired" = '+45.195' | 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 demographic ... | give me the number of patients whose primary disease is left colon cancer and age is less than 76? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.age < "76" | mimicsql_data |
CREATE TABLE table_name_26 (
rank VARCHAR,
year VARCHAR
) | What is the rank in 1940? | SELECT rank FROM table_name_26 WHERE year = "1940" | sql_create_context |
CREATE TABLE table_5365 (
"Club" text,
"Played" 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 is the losing bonus with 1 draw and 13 losses? | SELECT "Losing bonus" FROM table_5365 WHERE "Drawn" = '1' AND "Lost" = '13' | wikisql |
CREATE TABLE table_1717824_1 (
_percentage_2011 VARCHAR,
_percentage_2001 VARCHAR
) | What was the percentage in 2011 of the province that had 2.4% population in 2001? | SELECT _percentage_2011 FROM table_1717824_1 WHERE _percentage_2001 = "2.4%" | sql_create_context |
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,
round_trip_required varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CR... | what flights are between BOSTON and ATLANTA on 7 31 | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 31 AND date_day.month_number = 7 AND d... | atis |
CREATE TABLE table_19602 (
"Year" real,
"Tournaments played" real,
"Cuts made" real,
"Wins" real,
"2nd" real,
"3rd" real,
"Top 10s" real,
"Best finish" text,
"Earnings ( $ )" real,
"Money list rank" text,
"Scoring average" text,
"Scoring rank" text
) | What is the highest number of cuts made when her best finish is t4? | SELECT MAX("Cuts made") FROM table_19602 WHERE "Best finish" = 'T4' | 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 diagnosis short title is chr syst/diastl hrt fail and drug route is left eye. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Chr syst/diastl hrt fail" AND prescriptions.route = "LEFT EYE" | mimicsql_data |
CREATE TABLE table_69447 (
"Tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | Name the 2005 for 2003 of a and 2011 of 3r | SELECT "2005" FROM table_69447 WHERE "2003" = 'a' AND "2011" = '3r' | wikisql |
CREATE TABLE table_50634 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What place has the score of 67-74=141? | SELECT "Place" FROM table_50634 WHERE "Score" = '67-74=141' | wikisql |
CREATE TABLE table_42492 (
"Ballarat FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the lowest against that has bacchus marsh as a ballarat fl, with wins less than 1? | SELECT MIN("Against") FROM table_42492 WHERE "Ballarat FL" = 'bacchus marsh' AND "Wins" < '1' | wikisql |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | has patient 3229 in 12/2105 been tested for the po2? | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'po2') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3229) AND STRFTIME('%y-%m', labevents.charttime) = '2105-12' | mimic_iii |
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
... | Bar chart x axis time y axis meter_100, show by the names in asc. | SELECT Time, meter_100 FROM swimmer ORDER BY Time | nvbench |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,... | indicate the monthly maximum amount of d5/.45ns patient 19627 has received until 03/10/2104. | SELECT MAX(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19627)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
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... | 患者编号是61727301,有哪些门诊就诊记录对应的检验报告单的报告日期均在03年9月15日以后?出门诊就诊流水号都列出来? | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON 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 person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers... | css |
CREATE TABLE table_73324 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Original air date" text,
"Production code" real
) | Who wrote the episode with the production code 519? | SELECT "Written by" FROM table_73324 WHERE "Production code" = '519' | wikisql |
CREATE TABLE table_name_50 (
runner_up VARCHAR,
score VARCHAR
) | Who is the runner up when the score was 3 6, 6 3, [10 4]? | SELECT runner_up FROM table_name_50 WHERE score = "3–6, 6–3, [10–4]" | sql_create_context |
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 the number of patients whose primary disease is mesenteric ischemia with age below 86? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND demographic.age < "86" | mimicsql_data |
CREATE TABLE code_description (
code varchar,
description text
)
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 food_service (
meal_... | what DL leaves BOSTON for ATLANTA | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTO... | atis |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE restriction ... | list all flights from BOSTON to SAN FRANCISCO with at least 3 stops | 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, flight_stop WHERE ((flight.flight_id = flight_stop.flight_id AND flight.stops >= 3) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... | atis |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.