instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_58485 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was South Melbourne's away team opponents?
SELECT "Away team" FROM table_58485 WHERE "Home team" = 'south melbourne'
wikisql
CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Description VARCHAR(255) ) CREATE TABLE All_Documents ( Documen...
SELECT Location_Code, COUNT(Location_Code) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Location_Code)
nvbench
CREATE TABLE table_44454 ( "Season" text, "Races" real, "Wins" real, "Podiums" real, "Poles" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Poles, when Races is less than 16?
SELECT "Poles" FROM table_44454 WHERE "Races" < '16'
wikisql
CREATE TABLE table_name_63 ( year INTEGER, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has a Position of 9th?
SELECT AVG(year) FROM table_name_63 WHERE position = "9th"
sql_create_context
CREATE TABLE table_49143 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The tko (doctor stoppage) method was used in a loss...
SELECT "Opponent" FROM table_49143 WHERE "Method" = 'tko (doctor stoppage)' AND "Res." = 'loss'
wikisql
CREATE TABLE table_30770 ( "Episode air date" text, "Audition city" text, "Date" text, "Venue" text, "Callback date" text, "Callback venue" text, "Golden tickets" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the audition city when...
SELECT "Audition city" FROM table_30770 WHERE "Venue" = 'UPI Convention Center'
wikisql
CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_start_date DATETIME, booking_end_date DATETIME ) CREATE TABLE Apartment_Facilities ( apt_id INTEGER, facility_code CHAR(15) ) CREATE TABLE Guests ( gues...
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_11832 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What i...
SELECT "Score" FROM table_11832 WHERE "Team" = '@ houston'
wikisql
CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_number varchar(7), time_slot_id varchar(...
SELECT dept_name, SUM(credits) FROM course GROUP BY dept_name
nvbench
CREATE TABLE table_69744 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Score of 0 2?
SELECT "Record" FROM table_69744 WHERE "Score" = '0–2'
wikisql
CREATE TABLE table_57046 ( "Tournament" text, "Winner" text, "Runner-up" text, "Score" text, "Third Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the winner for the Tournament in Hong Kong with a third place winner named Mikael Pernfo...
SELECT "Winner" FROM table_57046 WHERE "Third Place" = 'mikael pernfors' AND "Tournament" = 'hong kong'
wikisql
CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_enrolment) DESC
nvbench
CREATE TABLE table_name_45 ( loses VARCHAR, points_for VARCHAR, points_against VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many losses have points against greater than 592, with high park demons as the club, and points for greate...
SELECT COUNT(loses) FROM table_name_45 WHERE points_against > 592 AND club = "high park demons" AND points_for > 631
sql_create_context
CREATE TABLE table_name_42 ( city_of_license VARCHAR, erp_w VARCHAR, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is City of License, when ERP W is greater than 3, and when Call Sign is K218DZ?
SELECT city_of_license FROM table_name_42 WHERE erp_w > 3 AND call_sign = "k218dz"
sql_create_context
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jy...
css
CREATE TABLE table_name_78 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average crowd size of Fitzroy's home team?
SELECT AVG(crowd) FROM table_name_78 WHERE home_team = "fitzroy"
sql_create_context
CREATE TABLE table_64835 ( "Japanese Title" text, "English Title" text, "Year" real, "First publisher" text, "ISBN" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ISBN of Japanese Title of (kiri no h monsha)?
SELECT "ISBN" FROM table_64835 WHERE "Japanese Title" = '霧の訪問者 (kiri no hōmonsha)'
wikisql
CREATE TABLE table_34095 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many were in attendance at Griffith Stadium with Philadelph...
SELECT "Attendance" FROM table_34095 WHERE "Game site" = 'griffith stadium' AND "Opponent" = 'philadelphia eagles'
wikisql
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT Them.Id AS "user_link", * FROM Users AS Them, Users AS Me WHERE Me.Id = '##userid##' AND Them.Reputation > Me.Reputation AND Them.CreationDate >= Me.CreationDate ORDER BY Them.Reputation
sede
CREATE TABLE table_204_811 ( id number, "year" number, "ring name\n(birth name)" text, "inducted by" text, "inducted for" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the only person to be inducted for wrestling and manag...
SELECT "ring name\n(birth name)" FROM table_204_811 WHERE "inducted for" = 'wrestling and managing'
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE table_65268 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" real, "Water (sqmi)" real, "Latitude" real, "Longitude" real, "GEO ID" real, "ANSI code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wh...
SELECT SUM("Pop. (2010)") FROM table_65268 WHERE "Latitude" > '47.710905' AND "Longitude" = '-101.79876' AND "Land ( sqmi )" < '35.695'
wikisql
CREATE TABLE market ( Number_cities INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many markets have number of cities smaller than 300?
SELECT COUNT(*) FROM market WHERE Number_cities < 300
sql_create_context
CREATE TABLE aircraft ( Aircraft_ID int, Order_Year int, Manufacturer text, Model text, Fleet_Series text, Powertrain text, Fuel_Propulsion text ) CREATE TABLE pilot_record ( Record_ID int, Pilot_ID int, Aircraft_ID int, Date text ) CREATE TABLE pilot ( Pilot_ID int, ...
SELECT Position, COUNT(Position) FROM pilot GROUP BY Position ORDER BY COUNT(Position) DESC
nvbench
CREATE TABLE table_14067 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Rank 6 has what notes?
SELECT "Notes" FROM table_14067 WHERE "Rank" = '6'
wikisql
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb....
css
CREATE TABLE table_52627 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average crowd size when the home tea...
SELECT AVG("Crowd") FROM table_52627 WHERE "Home team score" = '8.11 (59)'
wikisql
CREATE TABLE table_27155678_2 ( genus_species VARCHAR, accession_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the genus/species of accession number bx897699.1
SELECT genus_species FROM table_27155678_2 WHERE accession_number = "BX897699.1"
sql_create_context
CREATE TABLE table_56689 ( "Route Name" text, "Direction" text, "Termini" text, "Junctions" text, "Length" text, "Population Area" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What termini does the route with a population Area of aguilares hav...
SELECT "Termini" FROM table_56689 WHERE "Population Area" = 'aguilares'
wikisql
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, ...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14154) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents...
mimic_iii
CREATE TABLE table_34191 ( "Name" text, "Term" text, "Games" real, "Record (W\u2013L\u2013T / OTL)" text, "Points" real, "Win percentage" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name has Games of 105?
SELECT "Name" FROM table_34191 WHERE "Games" = '105'
wikisql
CREATE TABLE table_1354805_6 ( average VARCHAR, number_of_dances VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- tell the competitions where the mean is 1
SELECT average FROM table_1354805_6 WHERE number_of_dances = 1
sql_create_context
CREATE TABLE table_519 ( "Series Ep #" real, "Season 2 Ep #" real, "Title" text, "Director" text, "Writer(s)" text, "Original Airdate" text, "Production Code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of the original ...
SELECT COUNT("Original Airdate") FROM table_519 WHERE "Production Code" = '208'
wikisql
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number...
SELECT inputevents_cv.charttime 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 = 16088)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label...
mimic_iii
CREATE TABLE table_32460 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home team's score when the away team...
SELECT "Home team score" FROM table_32460 WHERE "Away team" = 'south melbourne'
wikisql
CREATE TABLE table_9333 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the opponent after march 21 and the game is 75?
SELECT "Opponent" FROM table_9333 WHERE "March" > '21' AND "Game" = '75'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT DATEADD(d, 0, DATEDIFF(d, 0, CreationDate)), COUNT(*) FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId INNER JOIN Votes AS v ON v.PostId = p.Id WHERE p.PostTypeId = 1 AND DATEADD(d, 0, DATEDIFF(d, 0, CreationDate)) > '2015-07-31 00:00:00' AND v.VoteTypeId = 3 GROUP BY DATEADD(d, 0, DATEDIFF(d, 0, Cr...
sede
CREATE TABLE table_25064 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many reasons for change were listed when Edward Hempstead was the succ...
SELECT COUNT("Reason for change") FROM table_25064 WHERE "Successor" = 'Edward Hempstead'
wikisql
CREATE TABLE table_name_21 ( points VARCHAR, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points were scored in the Detroit Home?
SELECT points FROM table_name_21 WHERE home = "detroit"
sql_create_context
CREATE TABLE table_60664 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has a finish of t66?
SELECT "Player" FROM table_60664 WHERE "Finish" = 't66'
wikisql
CREATE TABLE table_18018214_3 ( points INTEGER, goals_scored VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- HOw many points where there when the number of goals scored was 47?
SELECT MAX(points) FROM table_18018214_3 WHERE goals_scored = 47
sql_create_context
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 ) ...
SELECT meter_500, ID FROM swimmer
nvbench
CREATE TABLE table_name_2 ( driving_force_gt VARCHAR, g27_racing_wheel VARCHAR, gt_force VARCHAR, driving_force_pro VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- GT Force of no, and a Driving Force Pro of no, and a G27 Racing Wheel of no has what dr...
SELECT driving_force_gt FROM table_name_2 WHERE gt_force = "no" AND driving_force_pro = "no" AND g27_racing_wheel = "no"
sql_create_context
CREATE TABLE table_name_8 ( date VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the game played when it was located at bells beach?
SELECT date FROM table_name_8 WHERE location = "bells beach"
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0738029' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) > 1
css
CREATE TABLE table_62131 ( "Manager" text, "Mexico career" text, "Played" real, "Drawn" real, "Lost" real, "Win %" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highes win % that manager juan carlos ch vez's team had when they lost ...
SELECT MAX("Win %") FROM table_62131 WHERE "Manager" = 'juan carlos chávez' AND "Lost" < '4'
wikisql
CREATE TABLE table_3007 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the reason for change when the successor was William Milnes, Jr. (...
SELECT "Reason for change" FROM table_3007 WHERE "Successor" = 'William Milnes, Jr. (C)'
wikisql
CREATE TABLE table_44189 ( "Heat" real, "Lane" real, "Name" text, "Country" text, "Mark" text, "React" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest lane number for johan wissman when the react is less than 0.242?
SELECT MAX("Lane") FROM table_44189 WHERE "Name" = 'johan wissman' AND "React" < '0.242'
wikisql
CREATE TABLE table_73645 ( "WEEK" real, "Sydney" real, "Melbourne" real, "Brisbane" real, "Adelaide" real, "Perth" real, "TOTAL" real, "WEEKLY RANK" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes aired in Sydney in Week...
SELECT COUNT("Sydney") FROM table_73645 WHERE "WEEK" = '3'
wikisql
CREATE TABLE table_name_88 ( density INTEGER, province VARCHAR, area VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Density for the independencia province, with an area smaller than 2,007.4?
SELECT MAX(density) FROM table_name_88 WHERE province = "independencia" AND area < 2 OFFSET 007.4
sql_create_context
CREATE TABLE table_204_500 ( id number, "year" number, "title" text, "peak chart positions\nus country" number, "peak chart positions\nus" number, "album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of top ten hits kitty we...
SELECT COUNT(*) FROM table_204_500 WHERE "peak chart positions\nus country" <= 10 AND "year" = 1953
squall
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"
mimicsql_data
CREATE TABLE table_32218 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was South Melbourne's score as the home tea...
SELECT "Home team score" FROM table_32218 WHERE "Home team" = 'south melbourne'
wikisql
CREATE TABLE table_name_96 ( name VARCHAR, spread VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What name has a spread of 69?
SELECT name FROM table_name_96 WHERE spread = 69
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '4403555' AND IN_HOSP_DATE BETWEEN '2006-06-25' AND '2021-02-22' AND (REMOTE_SETTLE_FLG = '异地1' OR REMOTE_SETTLE_FLG = '异地2')
css
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT * FROM t_kc21 WHERE t_kc21.PERSON_ID = '55245256' AND t_kc21.MED_SER_ORG_NO = '6462307' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%针灸科%'
css
CREATE TABLE table_name_83 ( points INTEGER, engine VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the highest points that have a Mugen V8 engine and happened in 1991?
SELECT MAX(points) FROM table_name_83 WHERE engine = "mugen v8" AND year = 1991
sql_create_context
CREATE TABLE table_6798 ( "Episode" text, "VII Season" text, "VIII Season" text, "XII Season" text, "XIII Season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is XIII Season, when VIII Season is 4 780 743 (2 november 2008)?
SELECT "XIII Season" FROM table_6798 WHERE "VIII Season" = '4 780 743 (2 november 2008)'
wikisql
CREATE TABLE table_34756 ( "Rank" real, "Centre" text, "Country" text, "Rating" real, "Change" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Centre has a Rank of 42?
SELECT "Centre" FROM table_34756 WHERE "Rank" = '42'
wikisql
CREATE TABLE table_name_16 ( away_team VARCHAR, tie_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Away Team, when Tie No is 4?
SELECT away_team FROM table_name_16 WHERE tie_no = "4"
sql_create_context
CREATE TABLE table_16714 ( "Rnd" real, "Race" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Race Winner" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the re...
SELECT "Report" FROM table_16714 WHERE "Rnd" = '4'
wikisql
CREATE TABLE table_10781 ( "Call sign" text, "Frequency MHz" text, "City of license" text, "ERP W" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the frequency mhz for fcc and ERP W of 9 watts
SELECT "Frequency MHz" FROM table_10781 WHERE "FCC info" = 'fcc' AND "ERP W" = '9 watts'
wikisql
CREATE TABLE table_name_71 ( decision VARCHAR, visitor VARCHAR, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the decision when the visitor was Detroit and the home team was Ottawa?
SELECT decision FROM table_name_71 WHERE visitor = "detroit" AND home = "ottawa"
sql_create_context
CREATE TABLE table_name_63 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record on April 7?
SELECT record FROM table_name_63 WHERE date = "april 7"
sql_create_context
CREATE TABLE table_22877 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the surface of the final ...
SELECT "Surface" FROM table_22877 WHERE "Score in the final" = '6-2, 6-3'
wikisql
CREATE TABLE table_61612 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the event against U.S.A.?
SELECT "Status" FROM table_61612 WHERE "Opposing Teams" = 'u.s.a.'
wikisql
CREATE TABLE table_name_83 ( founded INTEGER, type VARCHAR, nickname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which of the private colleges is the oldest, and whose nickname is the Mountaineers?
SELECT MIN(founded) FROM table_name_83 WHERE type = "private" AND nickname = "mountaineers"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT demographic.dischtime FROM demographic WHERE demographic.subject_id = "18480"
mimicsql_data
CREATE TABLE table_62456 ( "Name" text, "Pos." text, "Height" text, "Weight" text, "Date of Birth" text, "Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Weight of the Spandau 04 Player with a Height of m (ft 5in)?
SELECT "Weight" FROM table_62456 WHERE "Club" = 'spandau 04' AND "Height" = 'm (ft 5in)'
wikisql
CREATE TABLE status ( station_id number, bikes_available number, docks_available number, time text ) CREATE TABLE trip ( id number, duration number, start_date text, start_station_name text, start_station_id number, end_date text, end_station_name text, end_station_id nu...
SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7
spider
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%EECS%' AND program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id
advising
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...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "GANGRENE" AND demographic.admityear >= "2103"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX num...
SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb 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 mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND person_info_hz_info.KH = hz_info.KH AND pers...
css
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
WITH two_answers AS (SELECT MIN(a.Id) AS first, MAX(a.Id) AS last FROM Posts AS q JOIN Posts AS a ON q.Id = a.ParentId WHERE q.AnswerCount = 2 GROUP BY q.Id HAVING CURRENT_TIMESTAMP() - MAX(a.CreationDate) > 30) SELECT AVG(CAST(COALESCE(f.Score, 0) AS FLOAT)), AVG(CAST(COALESCE(l.Score, 0) AS FLOAT)), ROUND(AVG(CAST(CO...
sede
CREATE TABLE table_17516967_1 ( swimsuit VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the swuinsuit for oregon
SELECT swimsuit FROM table_17516967_1 WHERE state = "Oregon"
sql_create_context
CREATE TABLE table_name_41 ( region VARCHAR, format VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what region was Degeneration released in digital format on 19 July 2008?
SELECT region FROM table_name_41 WHERE format = "digital" AND date = "19 july 2008"
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_info.XM = '尤清润'...
css
CREATE TABLE table_name_49 ( save VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the save of the game with rice as the opponent?
SELECT save FROM table_name_49 WHERE opponent = "rice"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmenti...
SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-39724')) AND DATETIME(allergy.allergytime) <= DATETIME(CURRENT_TIME(), '-1 y...
eicu
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperio...
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year') GR...
eicu
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Date_of_Birth, Weight FROM people ORDER BY Date_of_Birth DESC
nvbench
CREATE TABLE table_10643 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest Grid with a Driver of piers courage?
SELECT MAX("Grid") FROM table_10643 WHERE "Driver" = 'piers courage'
wikisql
CREATE TABLE table_68913 ( "Round" text, "Name" text, "Song" text, "Score" real, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What round has this song: - / - ?
SELECT "Round" FROM table_68913 WHERE "Song" = '陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你'
wikisql
CREATE TABLE table_12708 ( "Year" real, "Championship" text, "Partnering" text, "Opponents in Final" text, "Score in Final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the championship before 2012 that had Stephane Houdet Michael Jeremia...
SELECT "Championship" FROM table_12708 WHERE "Year" < '2012' AND "Opponents in Final" = 'stephane houdet michael jeremiasz'
wikisql
CREATE TABLE Customer_Orders ( order_id INTEGER, customer_id INTEGER, order_date DATETIME, order_status_code VARCHAR(15) ) CREATE TABLE Order_Items ( order_item_id INTEGER, order_id INTEGER, product_id INTEGER, order_quantity VARCHAR(80) ) CREATE TABLE Addresses ( address_id INTEGE...
SELECT T2.customer_name, COUNT(T2.customer_name) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name
nvbench
CREATE TABLE table_name_22 ( frequency_mhz VARCHAR, erp_w VARCHAR, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of frequency Mhz for when it has ERP W of 1 and call sign of w215bj
SELECT COUNT(frequency_mhz) FROM table_name_22 WHERE erp_w = 1 AND call_sign = "w215bj"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number,...
SELECT q.Cnt AS AnswerCount, COUNT(*) AS QuestionCount, COUNT(*) * 100.0 / MIN(TotalQuestions) AS "Percent" FROM (SELECT (SELECT COUNT(*) FROM Posts AS a WHERE a.PostTypeId = 1) AS TotalQuestions, (SELECT COUNT(*) FROM Posts AS a WHERE a.ParentId = q.Id AND a.PostTypeId = 2) AS Cnt FROM Posts AS q WHERE q.PostTypeId = ...
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, ...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '彭丽泽' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-05-05' AND '2011-10-16' GROUP BY t_kc21.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_49365 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Rider, when Grid is less than 16, when Manufacturer is Aprilia, and when Time is +28.288?
SELECT "Rider" FROM table_49365 WHERE "Grid" < '16' AND "Manufacturer" = 'aprilia' AND "Time" = '+28.288'
wikisql
CREATE TABLE table_3002894_4 ( nupowr_167 VARCHAR, model VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When maker is the model what is the nupowr 167?
SELECT nupowr_167 FROM table_3002894_4 WHERE model = "Maker"
sql_create_context
CREATE TABLE table_name_87 ( date VARCHAR, partner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Date had a Partner of urszula radwa ska?
SELECT date FROM table_name_87 WHERE partner = "urszula radwańska"
sql_create_context
CREATE TABLE table_train_73 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "severe_sepsis" bool, "in_another_study" bool, "systolic_blood_pressure_sbp" int, "skin_mottling_score" int, "glasgow_come_score_gcs" int, "mr_scanning" bool, "age" float, "NOUSE" float ) ...
SELECT * FROM table_train_73 WHERE (gender = 'male' OR gender = 'female') AND age > 18
criteria2sql
CREATE TABLE table_name_46 ( historical_photos VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Historical Photos were taken at prospect 43 prospect ave?
SELECT historical_photos FROM table_name_46 WHERE location = "prospect 43 prospect ave"
sql_create_context
CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE employee ( emp_num number, emp_lname text, emp_fname text, emp_initial text, emp_jobcode text, emp_hiredate time, emp_dob...
SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'
spider
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varch...
SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
CREATE TABLE table_67616 ( "Classification" text, "Fastest time (s)" real, "Athlete" text, "Country" text, "Date" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which athlete has the fastest time of 15.82?
SELECT "Athlete" FROM table_67616 WHERE "Fastest time (s)" = '15.82'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, ...
SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 76637 AND STRFTIME('%y', admissions.dischtime) >= '2102' ORDER BY admissions.dischtime DESC LIMIT 1
mimic_iii
CREATE TABLE table_name_30 ( winners VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who came in 3rd when Matej agar won?
SELECT 3 AS rd_place FROM table_name_30 WHERE winners = "matej žagar"
sql_create_context
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, ...
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, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'COLUMBUS' AND date_day.day_number = 22 AND date_day.month_number =...
atis
CREATE TABLE table_name_10 ( catalog VARCHAR, format VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What catalog uses the stereo compact cassette format?
SELECT catalog FROM table_name_10 WHERE format = "stereo compact cassette"
sql_create_context