instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE prescribes ( physician number, patient number, medication number, date time, appointment number, dose text ) CREATE TABLE affiliated_with ( physician number, department number, primaryaffiliation boolean ) CREATE TABLE appointment ( appointmentid number, patien...
SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1
spider
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text...
SELECT Time, meter_100 FROM swimmer ORDER BY meter_100
nvbench
CREATE TABLE table_name_64 ( location_of_the_church VARCHAR, sub_parish__sokn_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the Church that has a Sub-Parish (Sokn) of rugsund?
SELECT location_of_the_church FROM table_name_64 WHERE sub_parish__sokn_ = "rugsund"
sql_create_context
CREATE TABLE table_name_57 ( initial_owners VARCHAR, year_built VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the initial owners of Wasco in 1858?
SELECT initial_owners FROM table_name_57 WHERE year_built = 1858 AND name = "wasco"
sql_create_context
CREATE TABLE table_name_17 ( wins INTEGER, losses VARCHAR, draws VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the greatest number of wins for a team that had 7 losses and more than 0 draws?
SELECT MAX(wins) FROM table_name_17 WHERE losses = 7 AND draws > 0
sql_create_context
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...
SELECT UserId AS "user_link", DATE(CreationDate), COUNT(Id) AS editcount FROM PostHistory WHERE ((PostHistoryTypeId IN (4, 5, 6))) GROUP BY UserId, DATE(CreationDate) ORDER BY editcount DESC LIMIT 250
sede
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '吕...
css
CREATE TABLE 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 stadium ( ID int, name text, Capacity int, City text, Coun...
SELECT meter_300, ID FROM swimmer ORDER BY meter_300
nvbench
CREATE TABLE table_name_79 ( points INTEGER, mark VARCHAR, react VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the mark is 8.54, the reaction time was over 0.23800000000000002 seconds, what's the highest amount of points recorded?
SELECT MAX(points) FROM table_name_79 WHERE mark = "8.54" AND react > 0.23800000000000002
sql_create_context
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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ACIDOSIS" AND demographic.age < "63"
mimicsql_data
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
SELECT name, ID FROM swimmer ORDER BY ID
nvbench
CREATE TABLE table_70879 ( "Title" text, "Studio" text, "Role" text, "Leading lady" text, "Director" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the leading lady for Uni studio and Frank Strayer?
SELECT "Leading lady" FROM table_70879 WHERE "Studio" = 'uni' AND "Director" = 'frank strayer'
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 lab ( subject_id text, hadm_id text, ...
SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "42731"
mimicsql_data
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientuni...
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 5
eicu
CREATE TABLE table_203_117 ( id number, "region/country" text, "1882-\n1918" number, "1919-\n1948" number, "1948-\n1951" number, "1952-\n1960" number, "1961-\n1971" number, "1972-\n1979" number, "1980-\n1989" number, "1990-\n2001" number, "2002-\n2010" number, "2011-\n201...
SELECT "region/country" FROM table_203_117 ORDER BY "total" LIMIT 1
squall
CREATE TABLE table_24908 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the manner of leaving the team...
SELECT "Manner of departure" FROM table_24908 WHERE "Team" = 'Gostaresh Foolad'
wikisql
CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) 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 tex...
SELECT * FROM jybgb WHERE jybgb.JZLSH = '78857040071'
css
CREATE TABLE table_name_56 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the smallest crowd for the Richmond home team?
SELECT MIN(crowd) FROM table_name_56 WHERE home_team = "richmond"
sql_create_context
CREATE TABLE table_63923 ( "Club" text, "Wins" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of losses when wins is more than 6, club is camperdown and against is more than 1238?
SELECT SUM("Losses") FROM table_63923 WHERE "Wins" > '6' AND "Club" = 'camperdown' AND "Against" > '1238'
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...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '04270747' AND t_kc22.t_kc21_MED_SER_ORG_NO = '7760452' AND t_kc22.t_kc21_IN_HOSP_DATE BETWEEN '2000-03-02' AND '2009-09-13')
css
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB d...
SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY EMP_FNAME ORDER BY EMP_FNAME DESC
nvbench
CREATE TABLE table_75244 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Points have an Opponent of new york islanders, and a Game smaller than 65?
SELECT SUM("Points") FROM table_75244 WHERE "Opponent" = 'new york islanders' AND "Game" < '65'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolea...
SELECT p.Id AS "post_link", p.Body FROM Posts AS p WHERE p.Body LIKE '%##keyword##%' AND PostTypeId = 2 AND LENGTH(Body) <= 150 AND p.Id > (SELECT MAX(p2.Id) - 4000000 FROM Posts AS p2) LIMIT 100
sede
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '奚子默' AND gwyjzb.IN_HOSP_DATE BETWEEN '2001-09-21' AND '2009-02-26' AND gwyjzb.CLINIC_TYPE = '住院' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '奚子默' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2001-09-21' AND '2009-02-26' AND fgwyjzb.CLINIC_TYPE = '住院'
css
CREATE TABLE table_17964087_2 ( foreign_nationality VARCHAR, romanised_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to?
SELECT foreign_nationality FROM table_17964087_2 WHERE romanised_name = "Cheung, Raymond Man-to"
sql_create_context
CREATE TABLE domain ( did int, name varchar ) CREATE TABLE conference ( cid int, homepage varchar, name varchar ) CREATE TABLE domain_author ( aid int, did int ) CREATE TABLE journal ( homepage varchar, jid int, name varchar ) CREATE TABLE writes ( aid int, pid int ) ...
SELECT name FROM organization
academic
CREATE TABLE table_69380 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance on August 8?
SELECT "Attendance" FROM table_69380 WHERE "Date" = 'august 8'
wikisql
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
(SELECT jyjgzbb.JYZBLSH 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 = jyjgzbb.BGDH WHERE h...
css
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, ...
SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '谢飞烟' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2015-03-08')
css
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "Hemoglobin"
mimicsql_data
CREATE TABLE Apartment_Buildings ( building_id INTEGER, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80) ) CREATE TABLE Apartments ( apt_id INTEGER, ...
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY COUNT(*)
nvbench
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...
SELECT diagnoses.short_title FROM diagnoses WHERE diagnoses.icd9_code = "51889"
mimicsql_data
CREATE TABLE table_name_35 ( year INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has a Venue of bydgoszcz, poland?
SELECT AVG(year) FROM table_name_35 WHERE venue = "bydgoszcz, poland"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '李红旭' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-03-20')
css
CREATE TABLE table_21721351_18 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many positions is player Tom Glavine?
SELECT COUNT(position) FROM table_21721351_18 WHERE player = "Tom Glavine"
sql_create_context
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 ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue
nvbench
CREATE TABLE table_5823 ( "Placing" real, "Team" text, "Players" text, "Seeding" text, "Playoffs W-L" text, "Matches W-L" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Matches W-L of 1-2, and a Team of spain had what seeding?
SELECT "Seeding" FROM table_5823 WHERE "Matches W-L" = '1-2' AND "Team" = 'spain'
wikisql
CREATE TABLE prereq ( course_id text, prereq_id text ) CREATE TABLE advisor ( s_id text, i_id text ) CREATE TABLE instructor ( id text, name text, dept_name text, salary number ) CREATE TABLE takes ( id text, course_id text, sec_id text, semester text, year number,...
SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')
spider
CREATE TABLE table_15430606_1 ( length__minutes_ VARCHAR, no_in_series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of length minutes for number in series for 17
SELECT COUNT(length__minutes_) FROM table_15430606_1 WHERE no_in_series = "17"
sql_create_context
CREATE TABLE table_35310 ( "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 w...
SELECT "High points" FROM table_35310 WHERE "Date" = 'february 11'
wikisql
CREATE TABLE table_name_99 ( name VARCHAR, proposed VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the superfund that was proposed on 06/24/1988?
SELECT name FROM table_name_99 WHERE proposed = "06/24/1988"
sql_create_context
CREATE TABLE table_53926 ( "Year" real, "Network" text, "Lap-by-lap" text, "Pit reporters" text, "Host" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which lap-by-lap has a year after 1973, with pit reporter Bill Flemming?
SELECT "Lap-by-lap" FROM table_53926 WHERE "Year" > '1973' AND "Pit reporters" = 'bill flemming'
wikisql
CREATE TABLE ftxmzjzjlb ( 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...
SELECT txmzjzjlb.JZLSH FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '18784112' AND hz_info.YLJGDM = '0131624' AND txmzjzjlb.JZKSMC LIKE '%神外%' UNION SELECT ftxmzjzjlb.JZLSH FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJG...
css
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '5099708' AND wdmzjzjlb.JZKSMC = '胸部肿瘤科' AND wdmzjzjlb.RYDJSJ BETWEEN '2009-01-05' AND '2020-10-20' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '5099708' AND bdmzjzjlb.JZKSMC = '胸部肿瘤科' AND bdmzjzjlb.RYDJSJ BETWEEN '2009-01-05' AND '2020-10-20'
css
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, H...
SELECT t_kc22.SOC_SRT_DIRE_CD FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '36199412096' AND t_kc22.SOC_SRT_DIRE_NM = '复方氯己定含漱液'
css
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name te...
SELECT Id AS "comment_link", CreationDate FROM Comments WHERE UserId = @UserId AND Score = 0 ORDER BY CreationDate DESC
sede
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 ) -- Using valid SQLite, answer the following questions for the...
SELECT Code, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 GROUP BY Name
nvbench
CREATE TABLE diagnoses ( 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 (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "RUSS" AND demographic.discharge_location = "SNF"
mimicsql_data
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4040000' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-10-19' AND '2016-12-23' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4040000' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-10-19' AND '2016-12-23' AND t_kc21.MED_ORG_DEPT_NM = '慢病科'
css
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) -- Using valid SQLite, answer the following questions fo...
SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate ORDER BY COUNT(Fate) DESC
nvbench
CREATE TABLE table_20174050_1 ( format VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the format of the audio book titled The Mind Robber?
SELECT format FROM table_20174050_1 WHERE title = "The Mind Robber"
sql_create_context
CREATE TABLE table_name_65 ( title VARCHAR, artist VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What title does Overkill have before 1984?
SELECT title FROM table_name_65 WHERE artist = "overkill" AND year < 1984
sql_create_context
CREATE TABLE table_name_22 ( firefox VARCHAR, internet_explorer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of users were using Firefox according to the source that reported 21.70% used Internet Explorer?
SELECT firefox FROM table_name_22 WHERE internet_explorer = "21.70%"
sql_create_context
CREATE TABLE table_9529 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What tournament was on May 31, 1987?
SELECT "Tournament" FROM table_9529 WHERE "Date" = 'may 31, 1987'
wikisql
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 zyjzjlb ( CYBQDM text, CYBQMC...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE management ( department_id number, head_id number, temporary_acting text ) CREATE TABLE department ( department_id number, name text, creation text, ranking number, budget_in_billions number, num_employees number ) CREATE TABLE head ( head_id number, name text,...
SELECT T1.name, T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes'
spider
CREATE TABLE table_name_61 ( release_date VARCHAR, director VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was Wet Hare, directed by Robert McKimson, released?
SELECT release_date FROM table_name_61 WHERE director = "robert mckimson" AND title = "wet hare"
sql_create_context
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 ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2114" AND procedures.icd9_code = "5110"
mimicsql_data
CREATE TABLE table_16931 ( "Venue" text, "Hosted" real, "Average" real, "Highest" real, "Lowest" real, "Total" real, "Last Year" text, "Up/Down" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest attendance figure at Foot...
SELECT "Lowest" FROM table_16931 WHERE "Venue" = 'Football Park'
wikisql
CREATE TABLE table_49419 ( "Team 1" text, "Score" text, "Team 2" text, "1st round" text, "2nd round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which first round has a first team of angers sco (d1)?
SELECT "1st round" FROM table_49419 WHERE "Team 1" = 'angers sco (d1)'
wikisql
CREATE TABLE table_15621965_1 ( years_in_orlando VARCHAR, school_club_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the years in orlando for penn state
SELECT years_in_orlando FROM table_15621965_1 WHERE school_club_team = "Penn State"
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZ...
css
CREATE TABLE table_62005 ( "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text, "Winner's share ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What winning score has kraft...
SELECT "Winning score" FROM table_62005 WHERE "Tournament" = 'kraft nabisco championship'
wikisql
CREATE TABLE table_name_47 ( date VARCHAR, nation VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date when Russia was the nation and the venue was madrid , spain?
SELECT date FROM table_name_47 WHERE nation = "russia" AND venue = "madrid , spain"
sql_create_context
CREATE TABLE table_name_48 ( augmented_fifth VARCHAR, major_third VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The Major third of D has what for the Augmented fifth?
SELECT augmented_fifth FROM table_name_48 WHERE major_third = "d"
sql_create_context
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Attach pedicle graft NEC"
mimicsql_data
CREATE TABLE table_31479 ( "Round" real, "Circuit" text, "Date" text, "Length" text, "Pole Position" text, "GT3 Winner" text, "GT4 Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When tim bridgman gregor fisken is the pole position wh...
SELECT "GT3 Winner" FROM table_31479 WHERE "Pole Position" = 'Tim Bridgman Gregor Fisken'
wikisql
CREATE TABLE table_4300 ( "Year" real, "GDP at constant prices (THB trillions)" text, "GDP at constant prices growth rate (percent change)" text, "GDP at current prices (USD billions)" text, "Export volume of goods and services (percent change)" text, "Current account balance (percent of GDP)" t...
SELECT COUNT("Export volume of goods and services (percent change)") FROM table_4300 WHERE "GDP at constant prices (THB trillions)" = '3.072'
wikisql
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,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 locations ( LOCATIO...
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC
nvbench
CREATE TABLE table_61650 ( "Tournament" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE 2010 WITH 2012 OF 2R AT MIAMI ...
SELECT "2010" FROM table_61650 WHERE "2012" = '2r' AND "Tournament" = 'miami masters'
wikisql
CREATE TABLE table_name_89 ( grid INTEGER, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest grid for a time/retired of 1:56:18.22?
SELECT MIN(grid) FROM table_name_89 WHERE time_retired = "1:56:18.22"
sql_create_context
CREATE TABLE table_48983 ( "Region" text, "1950" real, "1960" real, "1970" real, "1980" real, "1990" real, "2000" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest value for 1960, when the value for 2000 is less than 8.4, whe...
SELECT MIN("1960") FROM table_48983 WHERE "2000" < '8.4' AND "1950" > '3.5' AND "1990" < '3.3'
wikisql
CREATE TABLE Customers ( customer_id INTEGER, customer_type_code VARCHAR(20), address_line_1 VARCHAR(80), address_line_2 VARCHAR(80), town_city VARCHAR(80), state VARCHAR(80), email_address VARCHAR(255), phone_number VARCHAR(80) ) CREATE TABLE Staff ( staff_id INTEGER, gender VA...
SELECT product_name, COUNT(*) FROM Products AS t1 JOIN Complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name
nvbench
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 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 = 'paracentesis' AND STRFTIME('%y', treatment.t...
eicu
CREATE TABLE table_30158 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production" text, "U.S. viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT COUNT("Original air date") FROM table_30158 WHERE "Written by" = 'David J. North & Janet Tamaro'
wikisql
CREATE TABLE table_1979619_3 ( party VARCHAR, residence VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the party for bensalem
SELECT party FROM table_1979619_3 WHERE residence = "Bensalem"
sql_create_context
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...
SELECT MIN(Posts.CreationDate), COUNT(*) / 7.0 AS "posts per day" FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Id = PostTags.PostId WHERE Tags.TagName = 'c++' GROUP BY TIME_TO_STR(Posts.CreationDate, '%W'), TIME_TO_STR(Posts.CreationDate, '%Y') ORDER BY MIN(Posts.CreationDate)
sede
CREATE TABLE table_19567 ( "Rank" real, "Country" text, "International tourist arrivals (2011)" text, "International tourist arrivals (2010)" text, "Change (2010 to 2011)" text, "Change (2009 to 2010)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "International tourist arrivals (2010)" FROM table_19567 WHERE "Change (2009 to 2010)" = '+11.1%'
wikisql
CREATE TABLE table_16526 ( "Year" text, "Champion" text, "Score" text, "Runner-Up" text, "Location" text, "Semi-Finalist #1" text, "Semi-Finalist #2" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of semi-finalist #2...
SELECT COUNT("Semi-Finalist #2") FROM table_16526 WHERE "Runner-Up" = 'East Carolina'
wikisql
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
SELECT * FROM Posts WHERE Posts.Id IN (SELECT PostTags.PostId FROM Tags JOIN PostTags ON (Tags.Id = PostTags.TagId)) AND Posts.CreationDate BETWEEN '29-APR-2013' AND '31-MAY-2013' AND Posts.Score >= 10
sede
CREATE TABLE table_1342149_42 ( party VARCHAR, candidates VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many parties match the canididates listed as howard baker, sr. (r) 68.9% boyd w. cox (d) 31.1%?
SELECT COUNT(party) FROM table_1342149_42 WHERE candidates = "Howard Baker, Sr. (R) 68.9% Boyd W. Cox (D) 31.1%"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, ...
SELECT jybgb.BGDH FROM hz_info JOIN zzmzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '13405731' AND jybgb.BGRQ BETWEEN '2019-02-09' AND '2020-...
css
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT HOSP_DOC_CD, HOSP_DOC_NM FROM t_kc22 WHERE MED_CLINIC_ID = '88854845172'
css
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality ORDER BY Nationality DESC
nvbench
CREATE TABLE table_49607 ( "Squad No." real, "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, "FLT Apps" text, "FLT Goals" real, "Total Apps" text, "Total G...
SELECT AVG("Squad No.") FROM table_49607 WHERE "Name" = 'martin smith' AND "League Goals" < '17'
wikisql
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 ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name
nvbench
CREATE TABLE table_20354_5 ( zodiac_sign VARCHAR, transcription VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the zodiac sing for the month whose transcription is Karakadakhom?
SELECT zodiac_sign FROM table_20354_5 WHERE transcription = "karakadakhom"
sql_create_context
CREATE TABLE table_28471 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Enrollment" real, "Joined" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the enrollment for tomcats
SELECT "Enrollment" FROM table_28471 WHERE "Nickname" = 'Tomcats'
wikisql
CREATE TABLE table_17355743_1 ( directed_by VARCHAR, written_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name who directed the episode by joe sachs and david zabel
SELECT directed_by FROM table_17355743_1 WHERE written_by = "Joe Sachs and David Zabel"
sql_create_context
CREATE TABLE table_59355 ( "Season" text, "Record" text, "Seed" text, "First Round" text, "Conference Semifinals" text, "Conference Finals" text, "NBA Finals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Conference Semifinals has a R...
SELECT "Conference Semifinals" FROM table_59355 WHERE "Record" = '55–27'
wikisql
CREATE TABLE table_33050 ( "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. -- Which Home team faced the Away team, Hawthorn?
SELECT "Home team" FROM table_33050 WHERE "Away team" = 'hawthorn'
wikisql
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ...
SELECT Id AS "profile_link", WebsiteUrl AS "website", AboutMe AS "about_me" FROM Users
sede
CREATE TABLE table_55809 ( "Name" text, "Country" text, "Status" text, "Moving to" text, "Transfer window" text, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the moving to with a transfer fee of free with a transfer status ...
SELECT "Moving to" FROM table_55809 WHERE "Transfer fee" = 'free' AND "Status" = 'transfer' AND "Name" = 'rodri'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '009-5001' AND patient.unitdischargetime IS NULL
eicu
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Meth sus pneum d/t Staph" AND prescriptions.route = "PO/NG"
mimicsql_data
CREATE TABLE table_name_95 ( score VARCHAR, to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Fred Funk had a to par of E, what was the score?
SELECT score FROM table_name_95 WHERE to_par = "e" AND player = "fred funk"
sql_create_context
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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 t...
SELECT jyjgzbb.JYZBLSH 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 = jyjgzbb.BGDH WHERE hz...
css
CREATE TABLE table_3119 ( "Venue" text, "Hosted" real, "Average" real, "Highest" real, "Lowest" real, "Total" real, "Last Year" text, "Up/Down" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the up/down associated with the Subiac...
SELECT "Up/Down" FROM table_3119 WHERE "Venue" = 'Subiaco Oval'
wikisql
CREATE TABLE table_name_47 ( result VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What result has texas longhorns as the opponent?
SELECT result FROM table_name_47 WHERE opponent = "texas longhorns"
sql_create_context
CREATE TABLE table_53736 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Time/Retired has a grid smaller than 9, a Ferrari construct, and is driven by Rubens Barriche...
SELECT "Time/Retired" FROM table_53736 WHERE "Grid" < '9' AND "Constructor" = 'ferrari' AND "Driver" = 'rubens barrichello'
wikisql