context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
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年8月30日到2008年5月14日内蒋锐锋病患所有检验报告单的审核日期时间是那几天?
SELECT zyjybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE person_info.XM = '蒋锐锋' ...
css
CREATE TABLE table_9467 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real )
What was victoria's away date?
SELECT "Date" FROM table_9467 WHERE "Away" = 'victoria'
wikisql
CREATE TABLE competition_record ( Competition_ID int, Farm_ID int, Rank int ) CREATE TABLE farm_competition ( Competition_ID int, Year int, Theme text, Host_city_ID int, Hosts text ) CREATE TABLE farm ( Farm_ID int, Year int, Total_Horses real, Working_Horses real, ...
Show the average of population from each status, list by the the average of population in asc.
SELECT Status, AVG(Population) FROM city GROUP BY Status ORDER BY AVG(Population)
nvbench
CREATE TABLE table_name_19 ( college VARCHAR, round VARCHAR, pick VARCHAR, position VARCHAR )
Which college with a position of rb had a pick larger than 6 in round 28?
SELECT college FROM table_name_19 WHERE pick > 6 AND position = "rb" AND round = 28
sql_create_context
CREATE TABLE table_name_94 ( bore VARCHAR, name VARCHAR )
Which Bore has a Name of 9 adr?
SELECT bore FROM table_name_94 WHERE name = "9 adr"
sql_create_context
CREATE TABLE table_32761 ( "Name" text, "Release date" text, "Latest version" text, "Status support" text, "Source model" text, "Architecture" text, "Target market" text )
Which Source model has a Release date of 1992-04-06?
SELECT "Source model" FROM table_32761 WHERE "Release date" = '1992-04-06'
wikisql
CREATE TABLE table_65711 ( "Team" text, "Matches" real, "Wins" real, "Wins %" text, "Draws" real, "Draws %" text, "Loses" real, "Loses %" text, "Against" real )
Which Draws % has Wins larger than 1, and Loses % of 0%, and a Team of al-zawraa?
SELECT "Draws %" FROM table_65711 WHERE "Wins" > '1' AND "Loses %" = '0%' AND "Team" = 'al-zawraa'
wikisql
CREATE TABLE table_20321 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What are all the CFL teams where the pick number is 36?
SELECT "CFL Team" FROM table_20321 WHERE "Pick #" = '36'
wikisql
CREATE TABLE table_22457 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" text, "Water (sqmi)" text, "Latitude" text, "Longitude" text, "GEO ID" real, "ANSI code" real )
What is the longitude with a latitude of 47.985154?
SELECT "Longitude" FROM table_22457 WHERE "Latitude" = '47.985154'
wikisql
CREATE TABLE mzb ( 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...
这个朱英杰患者往昔有那些治疗吗?
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '朱英杰' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.P...
css
CREATE TABLE table_56299 ( "Model" text, "Years" text, "Engine code" text, "Power" text, "Torque" text )
What is the Torque of the model with the engine code of M54B25?
SELECT "Torque" FROM table_56299 WHERE "Engine code" = 'm54b25'
wikisql
CREATE TABLE table_name_75 ( call_sign VARCHAR, erp_w VARCHAR )
What is the Call sign for the ERP W 19?
SELECT call_sign FROM table_name_75 WHERE erp_w = 19
sql_create_context
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 month ( ...
list possible round trip DAILY flights between BOSTON and OAKLAND
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, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_id...
atis
CREATE TABLE table_203_665 ( id number, "name" text, "municipality" text, "established" number, "tower height\nin meters (ft)" text, "focal plane\nin meters (ft)" text, "current status" text, "current condition" text )
were any towers established before the year 1800 ?
SELECT (SELECT COUNT(*) FROM table_203_665 WHERE "established" < 1800) > 0
squall
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
provide the number of patients whose admission location is transfer from hosp/extram and primary disease is bladder cancer/sda?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "BLADDER CANCER/SDA"
mimicsql_data
CREATE TABLE table_38879 ( "Place" text, "Code" real, "Area (km 2 )" real, "Population" real, "Most spoken language" text )
What's the lowest Code that's got a Most Spoke Language of Xhosa, a Place of Addo Elephant National Park, and an Area (KM 2) that's smaller than 1.08?
SELECT MIN("Code") FROM table_38879 WHERE "Most spoken language" = 'xhosa' AND "Place" = 'addo elephant national park' AND "Area (km 2 )" < '1.08'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
从13年5月11日到2020年4月11日这段时间,列出患者杨丹红所有检验报告单的审核日期时间吗?
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.person_info_XM = '杨丹红' AND jybgb.BGRQ BETWEEN '2013-05-11' AND '2020-04-11' ...
css
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
The software courses are taught by whom ?
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN area ON course_offering.course_id = area.course_id WHERE area.area LIKE '%...
advising
CREATE TABLE table_name_97 ( country VARCHAR, player VARCHAR )
Which country is Lee Trevino from?
SELECT country FROM table_name_97 WHERE player = "lee trevino"
sql_create_context
CREATE TABLE table_16731 ( "Rnd" real, "Race" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Race Winner" text, "Constructor" text, "Report" text )
what's the report with location sterreichring
SELECT "Report" FROM table_16731 WHERE "Location" = 'Österreichring'
wikisql
CREATE TABLE table_45221 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
Who was the opponent on December 2, 1962?
SELECT "Opponent" FROM table_45221 WHERE "Date" = 'december 2, 1962'
wikisql
CREATE TABLE table_name_35 ( time_retired VARCHAR, rider VARCHAR, laps VARCHAR, manufacturer VARCHAR, grid VARCHAR )
What was the time for Aprilia and their driver Casey Stoner, before gird 9, and less than 26 laps?
SELECT time_retired FROM table_name_35 WHERE manufacturer = "aprilia" AND grid < 9 AND laps < 26 AND rider = "casey stoner"
sql_create_context
CREATE TABLE table_28211213_2 ( institution VARCHAR, location VARCHAR )
When indianapolis, indiana is the location what is the institution?
SELECT institution FROM table_28211213_2 WHERE location = "Indianapolis, Indiana"
sql_create_context
CREATE TABLE table_44105 ( "Model" text, "Years" text, "Engine" text, "Displacement" text, "Power" text, "Fuel system" text )
What fuel system was used in 1960-62?
SELECT "Fuel system" FROM table_44105 WHERE "Years" = '1960-62'
wikisql
CREATE TABLE table_362 ( "Rocket launch" text, "Launch Date" text, "Mission" text, "Institutional authority" text, "Launch Site" text, "Outcomes" text, "Derivatives" text )
Which authority has a rocket launch called shahpar-2?
SELECT "Institutional authority" FROM table_362 WHERE "Rocket launch" = 'Shahpar-2'
wikisql
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id, and sort by the y axis in desc.
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) DESC
nvbench
CREATE TABLE table_203_102 ( id number, "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text )
how many world records does ethiopia hold ?
SELECT COUNT(*) FROM table_203_102 WHERE "nation" = 'ethiopia'
squall
CREATE TABLE zyb ( 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...
从2007年6月7日开始2020年1月13日结束名字为奚修然的参保人门诊西药费花费多少?
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_SEX = '奚修然' AND t_kc22.STA_DATE BETWEEN '2007-06-07' AND '2020-01-13' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_203_783 ( id number, "season" text, "tier" number, "division" text, "place" text )
how many times did internacional de madrid cf end the season at the top of their division ?
SELECT COUNT(*) FROM table_203_783 WHERE "place" = 1
squall
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid num...
in 12/this year when was the last lab test of patient 006-124193?
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-124193')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_T...
eicu
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, show me about the distribution of name and price , and group by attribute headquarter in a bar chart.
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name
nvbench
CREATE TABLE table_1277350_3 ( sunday_surya__the_sun_ VARCHAR, thursday_guru__jupiter_ VARCHAR )
In language where Thursday is bres'var, what is Sunday?
SELECT sunday_surya__the_sun_ FROM table_1277350_3 WHERE thursday_guru__jupiter_ = "برس وار Bres'var"
sql_create_context
CREATE TABLE table_name_41 ( high_rebounds VARCHAR, date VARCHAR )
Who had the most rebounds and how many did he have during the game on June 11?
SELECT high_rebounds FROM table_name_41 WHERE date = "june 11"
sql_create_context
CREATE TABLE table_5751 ( "Season" real, "Level" text, "Division" text, "Administration" text, "Position" text )
Which Division has a Position of 6th?
SELECT "Division" FROM table_5751 WHERE "Position" = '6th'
wikisql
CREATE TABLE table_9708 ( "Date" text, "Home team" text, "Score" text, "Away team" text, "Venue" text, "Box Score" text, "Report" text )
Which date had a venue of the State Sports Centre?
SELECT "Date" FROM table_9708 WHERE "Venue" = 'state sports centre'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
what is discharge time and diagnoses short title of subject name cynthia robinson?
SELECT demographic.dischtime, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Cynthia Robinson"
mimicsql_data
CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age ...
Give me a bar chart for the total number of each country, could you order from low to high by the the total number ?
SELECT Country, COUNT(*) FROM people GROUP BY Country ORDER BY COUNT(*)
nvbench
CREATE TABLE table_19136 ( "School" text, "Mascot" text, "Conference" text, "National Titles" real, "Founded" real )
which school has 14 large championships
SELECT "School" FROM table_19136 WHERE "National Titles" = '14'
wikisql
CREATE TABLE table_name_57 ( home_team VARCHAR, venue VARCHAR )
What is the score for the home team for the venue glenferrie oval?
SELECT home_team AS score FROM table_name_57 WHERE venue = "glenferrie oval"
sql_create_context
CREATE TABLE table_4826 ( "Award" text, "Year" real, "Category" text, "Nominated Work" text, "Result" text )
What category is the nominated work of cecilie, winner of the robert award?
SELECT "Category" FROM table_4826 WHERE "Nominated Work" = 'cecilie' AND "Award" = 'robert award'
wikisql
CREATE TABLE table_65807 ( "Draw" real, "Artist" text, "Song" text, "Percentage" text, "Place" real )
How many draw is in a place that is less than 1?
SELECT COUNT("Draw") FROM table_65807 WHERE "Place" < '1'
wikisql
CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text, movie_id text ) CREATE TABLE book_club ( book_club_id int, Year int, Author_or_Editor text, Book_Title text, Publisher text, Category tex...
Show all book categories and the number of books in each category, list in asc by the bar.
SELECT Category, COUNT(*) FROM book_club GROUP BY Category ORDER BY Category
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...
统计年龄高于22岁的患者医疗记录的平均医疗费总额是多少钱?
SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_AGE > 22 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE > 22 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE > 22 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PERSON...
css
CREATE TABLE table_name_12 ( ngc_number INTEGER, object_type VARCHAR, constellation VARCHAR )
What is the ngc number when the object type is lenticular galaxy and the constellation is hydra?
SELECT MAX(ngc_number) FROM table_name_12 WHERE object_type = "lenticular galaxy" AND constellation = "hydra"
sql_create_context
CREATE TABLE table_62741 ( "Name" text, "Feature" text, "Latitude" text, "Longitude" text, "Distance" text, "Bearing" text )
what is the distance for ridge?
SELECT "Distance" FROM table_62741 WHERE "Feature" = 'ridge'
wikisql
CREATE TABLE table_79088 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text )
What is the party of the maryland 6 district?
SELECT "Party" FROM table_79088 WHERE "District" = 'maryland 6'
wikisql
CREATE TABLE student_tests_taken ( registration_id number, date_test_taken time, test_result text ) CREATE TABLE course_authors_and_tutors ( author_id number, author_tutor_atb text, login_name text, password text, personal_name text, middle_name text, family_name text, gende...
List the dates of enrollment and completion of the student with family name 'Zieme' and personal name 'Bernie'.
SELECT T1.date_of_enrolment, T1.date_of_completion FROM student_course_enrolment AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie"
spider
CREATE TABLE table_22355_65 ( total_min_2_medals_ INTEGER )
What is the lowest overall number for total(min. 2 medals)?
SELECT MIN(total_min_2_medals_) FROM table_22355_65
sql_create_context
CREATE TABLE producer ( pid int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE classification ( id int, msid int, gid int ) CREATE TABLE movie ( mid int, title text, release_year int, title_aka text, budget text ) CREA...
How much was the budget of ' Finding Nemo
SELECT budget FROM movie WHERE title = 'Finding Nemo'
imdb
CREATE TABLE table_26387382_1 ( capacity__mw_ VARCHAR, turbines VARCHAR )
What all capacities have turbines between 50-60?
SELECT capacity__mw_ FROM table_26387382_1 WHERE turbines = "50-60"
sql_create_context
CREATE TABLE table_51226 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text, "Apparent magnitude" real )
Which Constellation has an Apparent magnitude larger that 7.7, and an NGC number of 7777
SELECT "Constellation" FROM table_51226 WHERE "Apparent magnitude" > '7.7' AND "NGC number" = '7777'
wikisql
CREATE TABLE table_name_37 ( week_14_nov_27 VARCHAR, week_13_nov_20 VARCHAR )
What was Week 14 when Week 13 was Nebraska (8-2)?
SELECT week_14_nov_27 FROM table_name_37 WHERE week_13_nov_20 = "nebraska (8-2)"
sql_create_context
CREATE TABLE table_12115 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real )
What is the per capita income with more than 2,466 households and a median family income of $53,940?
SELECT "Per capita income" FROM table_12115 WHERE "Number of households" > '2,466' AND "Median family income" = '$53,940'
wikisql
CREATE TABLE table_42164 ( "Goal" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
What is the Result of Goal number 3?
SELECT "Result" FROM table_42164 WHERE "Goal" = '3'
wikisql
CREATE TABLE table_45325 ( "Ceremony" text, "Date" text, "Host(s)" text, "Venue" text, "Film of the Year" text )
Which award ceremony took place on May 15, 1965?
SELECT "Ceremony" FROM table_45325 WHERE "Date" = 'may 15, 1965'
wikisql
CREATE TABLE table_48996 ( "Position" real, "Name" text, "Played" real, "Drawn" real, "Lost" real, "Points" real )
what is the average lost when played is more than 14?
SELECT AVG("Lost") FROM table_48996 WHERE "Played" > '14'
wikisql
CREATE TABLE player ( player_id text, birth_year number, birth_month number, birth_day number, birth_country text, birth_state text, birth_city text, death_year number, death_month number, death_day number, death_country text, death_state text, death_city text, na...
What is the average number of attendance at home games for each year?
SELECT year, AVG(attendance) FROM home_game GROUP BY year
spider
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, what is the relationship between code and revenue , and group by attribute headquarter?
SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
nvbench
CREATE TABLE table_name_8 ( county_team VARCHAR, club_team_s_ VARCHAR )
What country team had Thurles Sarsfields?
SELECT county_team FROM table_name_8 WHERE club_team_s_ = "thurles sarsfields"
sql_create_context
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
Return a pie chart on how old is the youngest person for each job?
SELECT job, MIN(age) FROM Person GROUP BY job
nvbench
CREATE TABLE table_11793221_2 ( commander VARCHAR, wounded VARCHAR )
Who were the commanders when 8 off 0 men were wounded?
SELECT commander FROM table_11793221_2 WHERE wounded = "8 off 0 men"
sql_create_context
CREATE TABLE table_2378 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text )
Name the originl title for no stars in the jungle
SELECT "Original title" FROM table_2378 WHERE "Film title used in nomination" = 'No Stars in the Jungle'
wikisql
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 ...
what was the first chr syst/diastl hrt fail diagnosis time of patient 87232 in the current hospital visit?
SELECT diagnoses_icd.charttime FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chr syst/diastl hrt fail') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 87232 AND admissi...
mimic_iii
CREATE TABLE table_name_90 ( date VARCHAR, venue VARCHAR )
What day did the VFL pay MCG?
SELECT date FROM table_name_90 WHERE venue = "mcg"
sql_create_context
CREATE TABLE table_11044765_1 ( league VARCHAR, mascot VARCHAR )
Which leagues have Raiders as their mascot?
SELECT league FROM table_11044765_1 WHERE mascot = "Raiders"
sql_create_context
CREATE TABLE table_203_179 ( id number, "goal" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text )
how many friendly matches were in the table ?
SELECT COUNT(*) FROM table_203_179 WHERE "competition" = 'friendly match'
squall
CREATE TABLE table_name_79 ( crowd VARCHAR, away_team VARCHAR )
In the match where newcastle jets was the away team, what was the crown attendance?
SELECT crowd FROM table_name_79 WHERE away_team = "newcastle jets"
sql_create_context
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...
how many drugs were prescribed in this year for patient 018-99743?
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-99743')) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIM...
eicu
CREATE TABLE table_name_63 ( season VARCHAR, division_three VARCHAR )
Which Season was the Division Three Hampton Park Rangers champions?
SELECT season FROM table_name_63 WHERE division_three = "hampton park rangers"
sql_create_context
CREATE TABLE table_name_80 ( d_47_o VARCHAR, d_48_o VARCHAR )
Name the D 47 O with D 48 O of r 9
SELECT d_47_o FROM table_name_80 WHERE d_48_o = "r 9"
sql_create_context
CREATE TABLE Office_locations ( name VARCHAR, id VARCHAR, building_id VARCHAR ) CREATE TABLE buildings ( name VARCHAR, id VARCHAR, building_id VARCHAR )
List the names of buildings that have no company office.
SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)
sql_create_context
CREATE TABLE table_204_805 ( id number, "name" text, "club" text, "date of departure" text, "replacement" text, "date of appointment" text )
hans r. esmer and christophe larrouilh were both replaced in what month in 2009 ?
SELECT "date of departure" FROM table_204_805 WHERE "name" = 'hans r. emser'
squall
CREATE TABLE table_name_54 ( name VARCHAR, position VARCHAR, weight__lbs_ VARCHAR )
What is the Name when the position is g, and weight is 190 pounds?
SELECT name FROM table_name_54 WHERE position = "g" AND weight__lbs_ = 190
sql_create_context
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
住院就诊32447494988的病患是哪一个病区的?病区对应的代码是什么?出院床位号呢
SELECT CYBQDM, CYBQMC, CYCWH FROM zyjzjlb WHERE JZLSH = '32447494988'
css
CREATE TABLE player ( player_id number, player text, years_played text, total_wl text, singles_wl text, doubles_wl text, team number ) CREATE TABLE country ( country_id number, country_name text, capital text, official_native_language text ) CREATE TABLE match_season ( ...
What are all the players who played in match season, sorted by college in ascending alphabetical order?
SELECT player FROM match_season ORDER BY college
spider
CREATE TABLE table_76396 ( "Name" text, "Gain" real, "Loss" real, "Long" real, "Avg/G" real )
How many losses did leon patton have with the longest gain higher than 45?
SELECT COUNT("Loss") FROM table_76396 WHERE "Name" = 'leon patton' AND "Long" > '45'
wikisql
CREATE TABLE table_17371 ( "Year" real, "Division" text, "League" text, "Reg. Season" text, "Playoffs" text, "Open Cup" text )
How many open cups were hosted in 1993?
SELECT COUNT("Open Cup") FROM table_17371 WHERE "Year" = '1993'
wikisql
CREATE TABLE table_name_53 ( total VARCHAR, player VARCHAR )
How many Total has a Player of dave stockton?
SELECT COUNT(total) FROM table_name_53 WHERE player = "dave stockton"
sql_create_context
CREATE TABLE table_24195232_1 ( founded VARCHAR, location VARCHAR )
How many entries are there for founded when the location was springfield, ohio?
SELECT COUNT(founded) FROM table_24195232_1 WHERE location = "Springfield, Ohio"
sql_create_context
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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
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 job_id and manager_id , and could you list in asc by the MANAGER_ID?
SELECT JOB_ID, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY MANAGER_ID
nvbench
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 are the four most commonly given microbiology tests for patients who have received vasopressors - norepinephrine > 0.1 micrograms/kg/min before, within 2 months in 2105?
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vasopressors - norepinephrine > 0.1 microgra...
eicu
CREATE TABLE table_47606 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
Who was the home team in the game with a record of 2-4?
SELECT "Home" FROM table_47606 WHERE "Record" = '2-4'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
编码为64591761431的检验报告单的所有检验指标的代码、名称、结果定量、结果定性、结果定量单位、参考值范围下限与上限都列出来是什么呢?
SELECT jyjgzbb.JCZBDM, jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDX, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW, jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM jyjgzbb WHERE jyjgzbb.BGDH = '64591761431'
css
CREATE TABLE table_60370 ( "Nation" text, "Distance" text, "Athlete" text, "Venue" text, "Date" text )
What is Date, when Athlete is 'Yussuf Alli'?
SELECT "Date" FROM table_60370 WHERE "Athlete" = 'yussuf alli'
wikisql
CREATE TABLE table_name_86 ( score VARCHAR, tie_no VARCHAR )
WHAT IS THE SCORE WITH A TIE NUMBER OF 13?
SELECT score FROM table_name_86 WHERE tie_no = "13"
sql_create_context
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) 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, admi...
I haven 't taken 373 , which upper classes can I take ?
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, program_course WHERE NOT COURSE_1.course_id IN (SELECT course_prerequisite.pre_course_id FROM course AS COURSE_0, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.cours...
advising
CREATE TABLE table_203_751 ( id number, "year" number, "title" text, "peak chart positions\nus\nair" number, "peak chart positions\nus\nmain" number, "peak chart positions\nus\nmod" number, "album" text )
which single was released after song i hate ?
SELECT "title" FROM table_203_751 WHERE "year" > (SELECT "year" FROM table_203_751 WHERE "title" = '"song i hate"') ORDER BY "year" LIMIT 1
squall
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
从一二年一月三十一日到一七年八月七日,患者22994447医治过的疾病有多少种
SELECT COUNT(DISTINCT IN_DIAG_DIS_CD) FROM t_kc21 WHERE PERSON_ID = '22994447' AND IN_HOSP_DATE BETWEEN '2012-01-31' AND '2017-08-07'
css
CREATE TABLE table_26436_2 ( original_broadway_cast VARCHAR )
who was in the 2005 role when the original broadway cast was played by jesse l. martin?
SELECT 2005 AS _film FROM table_26436_2 WHERE original_broadway_cast = "Jesse L. Martin"
sql_create_context
CREATE TABLE table_21642 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real )
Give the date of games against minnesota wild
SELECT "Date" FROM table_21642 WHERE "Opponent" = 'Minnesota Wild'
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 demographic ( subject_id text, hadm_id t...
what is the number of patients whose admission year is less than 2138 and lab test name is folate?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2138" AND lab.label = "Folate"
mimicsql_data
CREATE TABLE table_24976 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
How many pick # are there for the goaltender position?
SELECT MIN("Pick #") FROM table_24976 WHERE "Position" = 'Goaltender'
wikisql
CREATE TABLE table_19725 ( "Character" text, "French voice actor" text, "Italian voice actor" text, "German voice actor" text, "Spanish voice actor" text )
Name the character for sophie arthuys
SELECT "Character" FROM table_19725 WHERE "French voice actor" = 'Sophie Arthuys'
wikisql
CREATE TABLE table_80081 ( "Chapter" real, "Chinese" text, "Pinyin" text, "Translation" text, "Subject" text )
Name the total number of chapter for chinese of
SELECT COUNT("Chapter") FROM table_80081 WHERE "Chinese" = '釋宮'
wikisql
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, ...
Which classes will Prof. George Bornstein instruct this coming year ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%George Bornstein%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor....
advising
CREATE TABLE table_53848 ( "Species" text, "Strain" text, "Type" text, "Base Pairs" real, "Genes" real )
What type has an unspecified species and less than 367 genes?
SELECT "Type" FROM table_53848 WHERE "Species" = 'unspecified' AND "Genes" < '367'
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...
经过门诊确诊为酒精性肝硬化的病患其检测指标200010这一项的参考值范围下限和上限的具体数字是啥?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDSM = '酒精性肝硬化' AND jyjgzbb.JCZBDM = '200010'
css
CREATE TABLE table_15570 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
What is the lowest value for Events, when the value for Top-5 is greater than 1?
SELECT MIN("Events") FROM table_15570 WHERE "Top-5" > '1'
wikisql
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
is the potassium of patient 51858 last measured on the current hospital visit less than the value second to last measured on the current hospital visit.
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51858 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') ORDER BY labevents.charttim...
mimic_iii
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTyp...
Top Oracle PL/SQL from India.
SELECT DisplayName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 INNER JOIN Users ON Posts.OwnerUserId = Users.Id WHERE (TagName LIKE '%java%') AND LOWER(Location) LIKE '%...
sede