context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_13269 ( "Name" text, "Position" text, "League Apps" text, "League Goals" real, "FA Cup Apps" text, "FA Cup Goals" real, "League Cup Apps" text, "League Cup Goals" real, "Total Apps" text, "Total Goals" real )
Which Name has a League Cup Goals of 0, and League Apps of 1?
SELECT "Name" FROM table_13269 WHERE "League Cup Goals" = '0' AND "League Apps" = '1'
wikisql
CREATE TABLE table_58094 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How many gold have a National of New Zealand with a total less than 2?
SELECT SUM("Gold") FROM table_58094 WHERE "Nation" = 'new zealand' AND "Total" < '2'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationD...
Questions that get much attention but have the least amount of answers.
SELECT Id AS "post_link", AnswerCount, ViewCount FROM Posts WHERE PostTypeId = 1 AND ClosedDate IS NULL ORDER BY AnswerCount, ViewCount DESC LIMIT 1000
sede
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, ...
对于医疗费总额高于9559.88元的患者83111468的医疗记录,列出有什么入院诊断疾病编码和名称?
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '83111468' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 9559.88)
css
CREATE TABLE table_52035 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text )
What Date did the Home team play in essendon?
SELECT "Date" FROM table_52035 WHERE "Home team" = 'essendon'
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...
calculate the maximum days for which black/cape verdean ethnic background patients were admitted to hospital.
SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN"
mimicsql_data
CREATE TABLE broadcast_share ( Channel_ID int, Program_ID int, Date text, Share_in_percent real ) CREATE TABLE program ( Program_ID int, Name text, Origin text, Launch real, Owner text ) CREATE TABLE broadcast ( Channel_ID int, Program_ID int, Time_of_day text ) CREATE...
Find the total rating ratio for each channel owner Visualize by bar chart, sort in descending by the bars.
SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner ORDER BY Owner DESC
nvbench
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicationid number, pat...
what number of days have it been since patient 027-136480 was admitted to the hospital?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '027-136480' AND patient.hospitaldischargetime IS NULL
eicu
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 patients are admitted urgently and tested for lab item id 50805?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.itemid = "50805"
mimicsql_data
CREATE TABLE fzzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZD...
在11年7月15日到2014年12月18日之间病患17045983经过了哪些仪器的检查,在检验结果指标记录中仪器的编号是什么?
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ...
css
CREATE TABLE table_18653 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
How many first elections have Claude Fuller as incumbent?
SELECT COUNT("First elected") FROM table_18653 WHERE "Incumbent" = 'Claude Fuller'
wikisql
CREATE TABLE table_name_89 ( category_1 INTEGER, category_3 VARCHAR )
What's the sum of all values in category 1 when category 3 is equal to 300?
SELECT SUM(category_1) FROM table_name_89 WHERE category_3 = "300"
sql_create_context
CREATE TABLE table_30577 ( "School" text, "Gender" text, "Age Range" text, "Religious Affiliation" text, "Location" text, "School website" text )
What is the website of the school affiliated with the Church of England?
SELECT "School website" FROM table_30577 WHERE "Religious Affiliation" = 'Church of England'
wikisql
CREATE TABLE table_21868 ( "Fin. Pos" real, "Car No." real, "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Laps Led" real, "Points" text )
What is the time/retired if the driver is Marco Andretti?
SELECT "Time/Retired" FROM table_21868 WHERE "Driver" = 'Marco Andretti'
wikisql
CREATE TABLE table_204_146 ( id number, "tie" number, "home team" text, "score" text, "away team" text, "attendance" number )
who is the first away team on the list ?
SELECT "away team" FROM table_204_146 WHERE id = 1
squall
CREATE TABLE asset_parts ( asset_id number, part_id number ) CREATE TABLE maintenance_contracts ( maintenance_contract_id number, maintenance_contract_company_id number, contract_start_date time, contract_end_date time, other_contract_details text ) CREATE TABLE skills_required_to_fix ( ...
What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?
SELECT T1.staff_name, T1.staff_id FROM staff AS T1 JOIN fault_log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM staff AS T3 JOIN engineer_visits AS T4 ON T3.staff_id = T4.contact_staff_id
spider
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 ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
Give the average age of patients who have private insurance and have discharge location as rehab/disticnt part hosp.
SELECT AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "REHAB/DISTINCT PART HOSP"
mimicsql_data
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) 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, insuranc...
what was the name of the specimen test that patient 65582 had last received in this month?
SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65582) AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY microbiology...
mimic_iii
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM t...
在医疗就诊05238824503中,患者91730874的各检验科室的编码及名称均为?
SELECT JYKSBM, JYKSMC FROM jybgb WHERE JZLSH = '05238824503'
css
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, ...
provide the number of patients whose diagnoses short title is crnry athrscl natve vssl?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Crnry athrscl natve vssl"
mimicsql_data
CREATE TABLE table_1538516_1 ( maximum_ceiling_temperature VARCHAR, temperature_classification VARCHAR )
Name the most ceiling temperature for very extra high
SELECT maximum_ceiling_temperature FROM table_1538516_1 WHERE temperature_classification = "Very Extra High"
sql_create_context
CREATE TABLE table_71976 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text )
Name the surface for 20 march 2007
SELECT "Surface" FROM table_71976 WHERE "Date" = '20 march 2007'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE airport ( airport_code varchar, ...
does CO fly from PITTSBURGH to ATLANTA
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, flight WHERE ((flight.airline_code = 'CO') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.to_airport = AIRPORT_SE...
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, give me the comparison about price over the name , and group by attribute founder, and show in asc by the x-axis.
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name
nvbench
CREATE TABLE table_36564 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Scored" real, "Conceded" real, "Points" real )
What is listed as the highest Points that's got a Position that's smaller than 1?
SELECT MAX("Points") FROM table_36564 WHERE "Position" < '1'
wikisql
CREATE TABLE table_12792876_3 ( losing_bonus VARCHAR, points_against VARCHAR )
What was the losing bonus when the points against was 445?
SELECT losing_bonus FROM table_12792876_3 WHERE points_against = "445"
sql_create_context
CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE writes ( paperid int, ...
What are the 5 most recent papers of Mirella Lapata ?
SELECT DISTINCT paper.paperid, paper.year FROM author, paper, writes WHERE author.authorname = 'Mirella Lapata' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ORDER BY paper.year DESC LIMIT 5
scholar
CREATE TABLE table_22436 ( "Rank" real, "Title" text, "Release Date" text, "Franchise" text, "Developer(s)" text, "Platform" text, "Units sold (in Millions)" text )
What rank is Super Mario Land 2: 6 Golden Coins?
SELECT MIN("Rank") FROM table_22436 WHERE "Title" = 'Super Mario Land 2: 6 Golden Coins'
wikisql
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...
在零五年七月四号到二零年四月四号之间医院4991184所有的就诊记载里个人账户的支出与全部医疗费的平均比值
SELECT AVG(t_kc24.PER_ACC_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '4991184' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-07-04' AND '2020-04-04'
css
CREATE TABLE table_name_79 ( location_attendance VARCHAR, record VARCHAR )
What was the location/attendance for the game with a record of 16-6?
SELECT location_attendance FROM table_name_79 WHERE record = "16-6"
sql_create_context
CREATE TABLE table_25494 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Name the location attendance for minnesota
SELECT "Location Attendance" FROM table_25494 WHERE "Team" = 'Minnesota'
wikisql
CREATE TABLE Addresses ( address_id INTEGER, line_1_number_building VARCHAR(80), city VARCHAR(50), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50) ) CREATE TABLE Lessons ( lesson_id INTEGER, customer_id INTEGER, lesson_status_code VARCHAR(15), st...
What is the date of birth of every customer whose status code is 'Good Customer', and count them by a bar chart, and order by the Y-axis from high to low please.
SELECT date_of_birth, COUNT(date_of_birth) FROM Customers WHERE customer_status_code = 'Good Customer' ORDER BY COUNT(date_of_birth) 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, ...
what is the number of patients who are diagnosed with short title chr syst/diastl hrt fail?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Chr syst/diastl hrt fail"
mimicsql_data
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 ) ...
give me the number of patients whose admission type is urgent and year of birth is less than 2024?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.dob_year < "2024"
mimicsql_data
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the founder , and group by attribute founder by a bar chart, and show in desc by the x axis.
SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC
nvbench
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...
can i see ground transportation from LONG BEACH airport to downtown
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_code = airport_service.city_code AND CITY_0.city_name = 'LONG BEACH' AND CITY_1.city_name = 'LONG BEACH' AND ground_servic...
atis
CREATE TABLE table_name_91 ( attendance INTEGER, date VARCHAR )
Mean attendance for December 22, 1980?
SELECT AVG(attendance) FROM table_name_91 WHERE date = "december 22, 1980"
sql_create_context
CREATE TABLE table_name_28 ( socket VARCHAR, part_number_s_ VARCHAR )
What kind of socket is on the microprocessor with a part number of 80526pz533256?
SELECT socket FROM table_name_28 WHERE part_number_s_ = "80526pz533256"
sql_create_context
CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREATE TABLE Attribute_Definitions ( attribute_id INTEGER, attribute_name VARCHAR(30), attribute_data_type VARCHAR(10) ) ...
Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities. Show the proportion.
SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700
nvbench
CREATE TABLE table_name_29 ( top_5 INTEGER, position VARCHAR, year VARCHAR )
Name the average Top 5 which has a Position of 52nd with a Year smaller than 2000?
SELECT AVG(top_5) FROM table_name_29 WHERE position = "52nd" AND year < 2000
sql_create_context
CREATE TABLE table_58697 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
What is the highest draws that have 31 for points, wins greater than 12, with a goal difference less than 11?
SELECT MAX("Draws") FROM table_58697 WHERE "Points" = '31' AND "Wins" > '12' AND "Goal Difference" < '11'
wikisql
CREATE TABLE table_13297 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Scorers" text )
what is the result when the opponent is blackburn rovers?
SELECT "Result" FROM table_13297 WHERE "Opponent" = 'blackburn rovers'
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, ...
give me the number of patients whose diagnoses short title is status-post ptca and lab test name is calcium, total?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Status-post ptca" AND lab.label = "Calcium, Total"
mimicsql_data
CREATE TABLE table_34357 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalogue" text )
Which region has and eyeball label and catalogue 7200222?
SELECT "Region" FROM table_34357 WHERE "Label" = 'eyeball' AND "Catalogue" = '7200222'
wikisql
CREATE TABLE table_22297140_3 ( team VARCHAR, replaced_by VARCHAR )
Which team had a manager who was replaced by Faraz Kamalvand?
SELECT team FROM table_22297140_3 WHERE replaced_by = "Faraz Kamalvand"
sql_create_context
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate...
count the number of patients that have been discharged since 3 years ago from hospital.
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND DATETIME(admissions.dischtime) >= DATETIME(CURRENT_TIME(), '-3 year')
mimic_iii
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, ...
列举出在2001年2月17日到2007年7月3日这段时间内患者24318631所有检验报告单的审核日期时间是什么呢?
SELECT jybgb.SHSJ 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.RYBH = '24318631' AND jybgb.BGRQ BETWEEN '2001-02-17' AND '2007-07-03' UNION...
css
CREATE TABLE table_53792 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Name the high points for charlotte
SELECT "High points" FROM table_53792 WHERE "Team" = 'charlotte'
wikisql
CREATE TABLE table_21831229_3 ( written_by VARCHAR, no_in_series VARCHAR )
Who wrote episode 31 in the series?
SELECT written_by FROM table_21831229_3 WHERE no_in_series = 31
sql_create_context
CREATE TABLE table_name_57 ( station_name VARCHAR, chinese_name VARCHAR )
The Chinese Name of sh ngd belongs to what station?
SELECT station_name FROM table_name_57 WHERE chinese_name = "上地 shàngdì"
sql_create_context
CREATE TABLE table_name_3 ( lost INTEGER, points_difference VARCHAR, games VARCHAR )
What is the lowest number of games loss with a Points difference of 40 - 17, and over 6 games?
SELECT MIN(lost) FROM table_name_3 WHERE points_difference = "40 - 17" AND games > 6
sql_create_context
CREATE TABLE table_24656 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
How many partners were there when the score was 7 6 (7 4) , 6 3?
SELECT COUNT("Partner") FROM table_24656 WHERE "Score" = '7–6 (7–4) , 6–3'
wikisql
CREATE TABLE table_17480471_3 ( gatchaman VARCHAR, eagle_riders VARCHAR )
Which gatchaman has eagle riders as lukan?
SELECT gatchaman FROM table_17480471_3 WHERE eagle_riders = "Lukan"
sql_create_context
CREATE TABLE table_name_5 ( round VARCHAR, location VARCHAR, time VARCHAR )
What is the total number of Rounds held in Nevada, United States in which the time was 1:55?
SELECT COUNT(round) FROM table_name_5 WHERE location = "nevada, united states" AND time = "1:55"
sql_create_context
CREATE TABLE table_55429 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
What was the attendance for the game that has a record of 1-1?
SELECT "Attendance" FROM table_55429 WHERE "Record" = '1-1'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
calculate the average age of government health insurance patients who were admitted in hospital for a day.
SELECT AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.days_stay = "1"
mimicsql_data
CREATE TABLE table_57946 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
In the match where the away team scored 12.16 (88), who was the home team?
SELECT "Home team score" FROM table_57946 WHERE "Away team score" = '12.16 (88)'
wikisql
CREATE TABLE table_79825 ( "Nat." text, "Name" text, "Since" text, "Goals" real, "Transfer fee" text )
What is the since year for the player with more than 3 goals and a transfer fee of 400k?
SELECT "Since" FROM table_79825 WHERE "Goals" > '3' AND "Transfer fee" = '£400k'
wikisql
CREATE TABLE table_name_82 ( score_in_the_final VARCHAR, tournament VARCHAR )
What score in the final had a tournament of $25,000 Glasgow, Great Britain?
SELECT score_in_the_final FROM table_name_82 WHERE tournament = "$25,000 glasgow, great britain"
sql_create_context
CREATE TABLE table_4005 ( "\u2116" real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text )
What is the number in season of the episode whose production code is pabf05?
SELECT "#" FROM table_4005 WHERE "Production code" = 'PABF05'
wikisql
CREATE TABLE table_43682 ( "Rank" real, "Title" text, "Studio" text, "Director" text, "Gross" text )
Who directed Predator that was filmed with Fox Studio?
SELECT "Director" FROM table_43682 WHERE "Studio" = 'fox' AND "Title" = 'predator'
wikisql
CREATE TABLE film ( film_id number, title text, description text, release_year time, language_id number, original_language_id number, rental_duration number, rental_rate number, length number, replacement_cost number, rating text, special_features text, last_update ti...
When did the first payment happen?
SELECT payment_date FROM payment ORDER BY payment_date LIMIT 1
spider
CREATE TABLE table_name_36 ( fastest_lap VARCHAR, pole_position VARCHAR, winning_driver VARCHAR )
What was the fastest lap in a race where Phil Hill had the Pole position and was won by Wolfgang von Trips?
SELECT fastest_lap FROM table_name_36 WHERE pole_position = "phil hill" AND winning_driver = "wolfgang von trips"
sql_create_context
CREATE TABLE table_name_91 ( week INTEGER, date VARCHAR )
What was the latest week that had a game on November 18, 1951?
SELECT MAX(week) FROM table_name_91 WHERE date = "november 18, 1951"
sql_create_context
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDat...
How many Stack Overflow accounts are there?.
SELECT COUNT(*) FROM Users AS u
sede
CREATE TABLE table_59216 ( "Physical property" text, "Helium" text, "Neon" text, "Argon" text, "Krypton" text, "Xenon" text )
Which Xenon has a Helium of 5.1?
SELECT "Xenon" FROM table_59216 WHERE "Helium" = '5.1'
wikisql
CREATE TABLE table_43739 ( "Year" real, "Number" real, "Team" text, "Co-driver" text, "Position" text, "Laps" real )
What is the highest Year, when Laps is greater than 161?
SELECT MAX("Year") FROM table_43739 WHERE "Laps" > '161'
wikisql
CREATE TABLE table_203_490 ( id number, "date" text, "opponent#" text, "rank#" text, "site" text, "result" text, "attendance" number )
did the eagles play against virginia tech or alabama on september 8 ?
SELECT "opponent#" FROM table_203_490 WHERE "date" = 'september 8'
squall
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 mzjzjlb ( HXPLC number, HZXM ...
2008年5月16日-2018年8月8日期间,苏幼安这名患者的428058这个指标的所有记录
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy...
css
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 primary disease and diagnoses short title of subject name betty campbell?
SELECT demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Betty Campbell"
mimicsql_data
CREATE TABLE table_78998 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text )
What was the class for Appleton, Wisconsin?
SELECT "Class" FROM table_78998 WHERE "City of license" = 'appleton, wisconsin'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
when did patient 030-47098 get the volume (ml)-potassium chloride 10 meq in 100 ml ivpb first time until 1235 days ago?
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 = '030-47098')) AND intakeoutput.cellpath LIKE '%intake%...
eicu
CREATE TABLE vehicles ( vehicle_id number, vehicle_details text ) CREATE TABLE addresses ( address_id number, line_1_number_building text, city text, zip_postcode text, state_province_county text, country text ) CREATE TABLE customers ( customer_id number, customer_address_id n...
What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?
SELECT first_name, last_name FROM customers WHERE amount_outstanding BETWEEN 1000 AND 3000
spider
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) 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...
list all flights from CHICAGO to SEATTLE on CO which depart on saturday before 1200 and include a meal
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, food_service WHERE ((((flight.departure_time < 1200 AND food_service.meal_code = flight.meal_code) AND date_day.day_number = 26 AND date_day.month_num...
atis
CREATE TABLE table_15657 ( "Team" text, "Car(s)" text, "Driver(s)" text, "Primary Sponsor(s)" text, "Owner(s)" text, "Crew Chief" text )
What team does Reed Sorenson drive for?
SELECT "Team" FROM table_15657 WHERE "Driver(s)" = 'reed sorenson'
wikisql
CREATE TABLE table_36416 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text )
What is the highest Feb value having an opponent of the Philadelphia Flyers and is after game 63?
SELECT MAX("February") FROM table_36416 WHERE "Opponent" = 'philadelphia flyers' AND "Game" > '63'
wikisql
CREATE TABLE all_documents ( document_id number, date_stored time, document_type_code text, document_name text, document_description text, other_details text ) CREATE TABLE ref_calendar ( calendar_date time, day_number number ) CREATE TABLE employees ( employee_id number, role_...
Show the ids of all employees who have authorized destruction.
SELECT DISTINCT destruction_authorised_by_employee_id FROM documents_to_be_destroyed
spider
CREATE TABLE table_11804 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Report" text )
What driver was the winner when constructor was Maserati at the Monaco grand prix?
SELECT "Winning driver" FROM table_11804 WHERE "Constructor" = 'maserati' AND "Race" = 'monaco grand prix'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
has patient 9297's arterial bp mean been normal?
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 = 9297)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' ...
mimic_iii
CREATE TABLE table_49155 ( "Skip" text, "Third/Vice skip" text, "Second" text, "Lead" text, "City" text )
Which Third/Vice skip has a Second of ric sylvain?
SELECT "Third/Vice skip" FROM table_49155 WHERE "Second" = 'éric sylvain'
wikisql
CREATE TABLE table_23891 ( "School" text, "Location(s)" text, "Control" text, "Type" text, "Enrollment (2009)" real, "Founded" real )
What type of school had an enrollment in 2009 of 224?
SELECT "Type" FROM table_23891 WHERE "Enrollment (2009)" = '224'
wikisql
CREATE TABLE table_64114 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What is the week with w 31-21 result?
SELECT "Week" FROM table_64114 WHERE "Result" = 'w 31-21'
wikisql
CREATE TABLE table_38771 ( "Medal" text, "Name" text, "Games" text, "Sport" text, "Event" text )
What event did Cristina Iovu participate in?
SELECT "Event" FROM table_38771 WHERE "Name" = 'cristina iovu'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDa...
Language trends (# of Questions per Month).
SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ...
sede
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varc...
What are all of the PreMajor classes ?
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
advising
CREATE TABLE table_46728 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
Which player has a To par of 6?
SELECT "Player" FROM table_46728 WHERE "To par" = '–6'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time...
tell me the sex of patient 028-40370.
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '028-40370'
eicu
CREATE TABLE table_41779 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is Score, when Set 3 is 17-25?
SELECT "Score" FROM table_41779 WHERE "Set 3" = '17-25'
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 ...
find the primary disease of robert clayton.
SELECT demographic.diagnosis FROM demographic WHERE demographic.name = "Robert Clayton"
mimicsql_data
CREATE TABLE table_27455867_1 ( callback_audition_date VARCHAR, episode_air_date VARCHAR )
When were the callback auditions for the audition city in the episode aired on February 9, 2011?
SELECT callback_audition_date FROM table_27455867_1 WHERE episode_air_date = "February 9, 2011"
sql_create_context
CREATE TABLE table_23050383_1 ( kei VARCHAR, economic_incentive_regime VARCHAR )
How many KEI catagories are listed when the economic incentive regime is 2.56?
SELECT COUNT(kei) FROM table_23050383_1 WHERE economic_incentive_regime = "2.56"
sql_create_context
CREATE TABLE customer ( cust_ID varchar(3), cust_name varchar(20), acc_type char(1), acc_bal int, no_of_loans int, credit_score int, branch_ID int, state varchar(20) ) CREATE TABLE bank ( branch_ID int, bname varchar(20), no_of_customers int, city varchar(10), state ...
For each account type, find the average account balance of customers with credit score lower than 50. Show a pie chart.
SELECT acc_type, AVG(acc_bal) FROM customer WHERE credit_score < 50 GROUP BY acc_type
nvbench
CREATE TABLE table_name_16 ( caps VARCHAR, player VARCHAR, club_province VARCHAR, position VARCHAR )
How many Caps does the Club/province Munster, position of lock and Mick O'Driscoll have?
SELECT COUNT(caps) FROM table_name_16 WHERE club_province = "munster" AND position = "lock" AND player = "mick o'driscoll"
sql_create_context
CREATE TABLE table_27891 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text )
What type of settlemen is Kru edol Selo?
SELECT "Type" FROM table_27891 WHERE "Settlement" = 'Krušedol Selo'
wikisql
CREATE TABLE table_24500 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
Who was the successor in New York 11th district?
SELECT "Successor" FROM table_24500 WHERE "District" = 'New York 11th'
wikisql
CREATE TABLE table_name_9 ( d_shulman VARCHAR, c_abate VARCHAR )
What is the number for D. Shulman if C. Abate has 728 (43%)
SELECT d_shulman FROM table_name_9 WHERE c_abate = "728 (43%)"
sql_create_context
CREATE TABLE table_29921 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who had the most assists agains New Orleans?
SELECT "High assists" FROM table_29921 WHERE "Team" = 'New Orleans'
wikisql
CREATE TABLE table_name_79 ( resident_country VARCHAR, local_location VARCHAR )
What is Resident Country, when Local Location is 'Copenhagen'?
SELECT resident_country FROM table_name_79 WHERE local_location = "copenhagen"
sql_create_context
CREATE TABLE table_27051 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
What was the title of the episode written by Julia Newton in series 48?
SELECT "Title" FROM table_27051 WHERE "Written by" = 'Julia Newton' AND "No. in series" = '48'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number,...
when is patient 006-81423's per iv flush: upper arm r 20 gauge intake the first time until 1959 days ago?
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-81423')) AND intakeoutput.cellpath LIKE '%intake%...
eicu