instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE Skills_Required_To_Fix ( part_fault_id INTEGER, skill_id INTEGER ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Engineer_Skills ( engineer_id INTEGER, ...
SELECT fault_description, COUNT(fault_description) FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY fault_description ORDER BY fault_description DESC
nvbench
CREATE TABLE table_18591 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many districts have an incumbent first elected in 1940?
SELECT COUNT("District") FROM table_18591 WHERE "First elected" = '1940'
wikisql
CREATE TABLE table_53165 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when philadelphia visited?
SELECT "Score" FROM table_53165 WHERE "Visitor" = 'philadelphia'
wikisql
CREATE TABLE people ( People_ID int, Name text, Age real, Height real, Hometown text ) CREATE TABLE gymnast ( Gymnast_ID int, Floor_Exercise_Points real, Pommel_Horse_Points real, Rings_Points real, Vault_Points real, Parallel_Bars_Points real, Horizontal_Bar_Points real...
SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY Hometown
nvbench
CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_descriptio...
SELECT staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name
nvbench
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE chart...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'procedures_icd' AND cost.event_id IN (SELECT procedures_icd.row_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'proximal gastrectomy'))
mimic_iii
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABL...
SELECT p.OwnerUserId AS "user_link", p.OwnerDisplayName, SUM(p.Score) AS "total_score", COUNT(p.Id) AS "total_posts", SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS "total_questions", SUM(CASE WHEN p.PostTypeId = 2 THEN 1 ELSE 0 END) AS "total_answers", SUM(CASE WHEN p.PostTypeId = 1 THEN p.Score ELSE 0 END) AS "...
sede
CREATE TABLE table_204_978 ( id number, "position" number, "nation" number, "number" number, "name" text, "soproni liga" number, "uefa cup" number, "hungarian cup" number, "league cup" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables...
SELECT COUNT("name") FROM table_204_978 WHERE "total" > 10
squall
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_kc22.DOSE_FORM, t_kc22.SPEC 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 = '49882698620' AND t_kc22.SOC_SRT_DIRE_NM = '稳心颗粒'
css
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 p.Score, p.Id AS "post_link", p.ViewCount, p.OwnerUserId AS "user_link", p.CreationDate FROM Posts AS p INNER JOIN PostHistory AS h ON h.PostId = p.Id WHERE NOT p.ClosedDate IS NULL AND p.ClosedDate = h.CreationDate AND h.PostHistoryTypeId = 10 AND h.Comment = '1' AND NOT p.Body LIKE '%<strong>Possible Duplicate...
sede
CREATE TABLE table_1462 ( "Season" text, "Winner" text, "Winning Song" text, "Winning Song (English Title)" text, "Debut Album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many winning songs were there with an english title of all for love?
SELECT COUNT("Winning Song") FROM table_1462 WHERE "Winning Song (English Title)" = 'All For Love'
wikisql
CREATE TABLE table_38436 ( "Round" real, "Pick" real, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the college that is from a round greater than 3 with Gillis Wilson playing?
SELECT "College" FROM table_38436 WHERE "Round" > '3' AND "Player" = 'gillis wilson'
wikisql
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 MED_INV_ITEM_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '44686986208' AND SOC_SRT_DIRE_CD = '8154'
css
CREATE TABLE table_52341 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which lap number had Olivier Panis as a driver?
SELECT "Laps" FROM table_52341 WHERE "Driver" = 'olivier panis'
wikisql
CREATE TABLE table_204_298 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- before the 2000 olympic games what was johanna 's fastest 200m t...
SELECT "notes" FROM table_204_298 WHERE "year" < 2000 AND "event" = '200 m' ORDER BY "notes" LIMIT 1
squall
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.days_stay > "1"
mimicsql_data
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, ...
SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 25696 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ...
mimic_iii
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyj...
css
CREATE TABLE table_59046 ( "Name" text, "Location" text, "Years as tallest" text, "Height metres / ft" text, "Floors" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Height metres / ft of Floors of 05.0 n/a?
SELECT "Height metres / ft" FROM table_59046 WHERE "Floors" = '05.0 n/a'
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 qtb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '3046592' GROUP BY qtb.MED_ORG_DEPT_CD UNION SELECT gyb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_...
css
CREATE TABLE Detention ( detention_id INTEGER, detention_type_code VARCHAR(10), teacher_id INTEGER, datetime_detention_start DATETIME, datetime_detention_end DATETIME, detention_summary VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Ref_Incident_Type ( incident_type_code VARCHA...
SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses GROUP BY date_address_to ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_63817 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of wins when...
SELECT SUM("Wins") FROM table_63817 WHERE "Scored" < '26' AND "Conceded" > '23'
wikisql
CREATE TABLE browser ( market_share VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many main stream browsers whose market share is at least 5 exist?
SELECT COUNT(*) FROM browser WHERE market_share >= 5
sql_create_context
CREATE TABLE table_name_19 ( rank VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of rank for the country of greece?
SELECT COUNT(rank) FROM table_name_19 WHERE country = "greece"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-18575...
eicu
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 JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '5715997' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸倍他司汀片(糖衣)' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjzb.MED_SER_ORG_NO = '5715997' AND t_kc22.SOC...
css
CREATE TABLE table_15136 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Diego Junqueira Gabriel Trujillo-Soler's opponent's s...
SELECT "Score" FROM table_15136 WHERE "Opponents" = 'diego junqueira gabriel trujillo-soler'
wikisql
CREATE TABLE table_40818 ( "1935" text, "1936" text, "1937" text, "1938" text, "1939" text, "1940" text, "1941" text, "1943" text, "1945" text, "1946" text, "1947" text, "1948" text, "1949" text, "1950" text, "1951" text, "1952" text, "1953" text ) -...
SELECT "1953" FROM table_40818 WHERE "1949" = '2' AND "1952" = '3'
wikisql
CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE appellations ( No...
SELECT Year, COUNT(Year) FROM wine WHERE Price > 100 ORDER BY COUNT(Year)
nvbench
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '马彭魄' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 9768.75)
css
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req 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 ...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%topic0%' OR name LIKE '%topic0%') AND department = 'EECS'
advising
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
(SELECT jyjgzbb.YQBH, jyjgzbb.YQMC 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.B...
css
CREATE TABLE Order_Items ( Order_Item_ID INTEGER, Order_ID INTEGER, Product_ID INTEGER, Order_Quantity VARCHAR(288), Other_Item_Details VARCHAR(255) ) CREATE TABLE Invoice_Items ( Invoice_Item_ID INTEGER, Invoice_ID INTEGER, Order_ID INTEGER, Order_Item_ID INTEGER, Product_ID IN...
SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code
nvbench
CREATE TABLE table_27816698_2 ( institution VARCHAR, founded VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which institution was founded in 1932?
SELECT institution FROM table_27816698_2 WHERE founded = 1932
sql_create_context
CREATE TABLE table_name_58 ( total INTEGER, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Total, when Year(s) Won is '1948 , 1950 , 1951 , 1953'?
SELECT MIN(total) FROM table_name_58 WHERE year_s__won = "1948 , 1950 , 1951 , 1953"
sql_create_context
CREATE TABLE table_40791 ( "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. -- On what date was the tournament played that eneded with a winning score of +6 (7...
SELECT "Date" FROM table_40791 WHERE "Runner(s)-up" = 'arnold palmer' AND "Margin of victory" = '2 strokes' AND "Winning score" = '+6 (74-71-70-71=286)'
wikisql
CREATE TABLE store_product ( Store_ID int, Product_ID int ) CREATE TABLE product ( product_id int, product text, dimensions text, dpi real, pages_per_minute_color real, max_page_size text, interface text ) CREATE TABLE store_district ( Store_ID int, District_ID int ) CREAT...
SELECT Type, COUNT(*) FROM store GROUP BY Type
nvbench
CREATE TABLE table_38869 ( "Model" text, "Years" text, "Engine" text, "Displ." text, "Power" text, "Torque" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the torque for Model of 2.0 bitdi (cr) dpf, in 2010 ?
SELECT "Torque" FROM table_38869 WHERE "Model" = '2.0 bitdi (cr) dpf' AND "Years" = '2010–'
wikisql
CREATE TABLE table_name_80 ( player VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player went to DePaul University?
SELECT player FROM table_name_80 WHERE college = "depaul"
sql_create_context
CREATE TABLE table_25273 ( "Year" real, "Class" text, "Team name" text, "Bike" text, "Riders" text, "Races" text, "Wins" real, "Podiums" real, "Poles" real, "F.laps" real, "Points" real, "Pos." text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT MAX("Poles") FROM table_25273 WHERE "Pos." = '19th'
wikisql
CREATE TABLE table_name_82 ( city_of_license VARCHAR, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city of license has a value of k293bg for its call sign?
SELECT city_of_license FROM table_name_82 WHERE call_sign = "k293bg"
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 CHA_ITEM_LEV FROM t_kc22 WHERE MED_CLINIC_ID = '46298054925' AND SOC_SRT_DIRE_NM = '盐酸氟西汀片'
css
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...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) DESC
nvbench
CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME, Day_Number INTEGER ) CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document...
SELECT Location_Code, COUNT(Location_Code) FROM Document_Locations GROUP BY Location_Code ORDER BY Location_Code
nvbench
CREATE TABLE table_203_296 ( id number, "country" text, "total gdp (nominal)\n(billion us$)" text, "gdp per capita\n(us$, ppp)" text, "gdp growth,\n2007-2011\n(in %)" number, "hdi" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the only ...
SELECT "country" FROM table_203_296 WHERE "gdp per capita\n(us$, ppp)" = 6324
squall
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-77873')) AND lab.labname = 'ph' AND DATETIME(lab.labresulttime, 'start of year') = ...
eicu
CREATE TABLE table_name_61 ( pick__number VARCHAR, team_from VARCHAR, league_from VARCHAR, nationality VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team ...
SELECT COUNT(pick__number) FROM table_name_61 WHERE league_from = "ontario hockey league" AND nationality = "united states" AND team_from = "brampton battalion"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "STEMI"
mimicsql_data
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABL...
SELECT COUNT(instructor.name), instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'ARTDES' AND course.number = 301 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = ...
advising
CREATE TABLE table_31803 ( "Year" real, "Date" text, "Event" text, "Days" text, "Stages" text, "Acts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When is the Monsters of Rock show with 12 bands?
SELECT "Date" FROM table_31803 WHERE "Event" = 'monsters of rock' AND "Acts" = '12 bands'
wikisql
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 1 AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT has_projects FROM course WHERE department = 'EECS' AND number = 489
advising
CREATE TABLE gyb ( 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 COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '3252548' AND qtb.IN_HOSP_DATE BETWEEN '2002-04-17' AND '2019-06-12' AND qtb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '3252548' AND gyb.IN_HOSP_DATE BETWEEN '2002-04-17' AND '2019-06-12' AND gyb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) ...
css
CREATE TABLE company ( id int, name text, country_code varchar ) CREATE TABLE copyright ( id int, msid int, cid int ) CREATE TABLE producer ( pid int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE cast ( id int, msid i...
SELECT movie.title FROM classification, genre, movie WHERE genre.genre = 'comedies' AND genre.gid = classification.gid AND movie.mid = classification.msid AND movie.release_year = 2015
imdb
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT patient.age FROM patient WHERE patient.uniquepid = '011-31229' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1
eicu
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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '43770039' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 9882.0) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '43770039' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLIN...
css
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TAB...
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-9756')) AND lab.labname = 't3' AND DATETIME(lab.labresulttime, 'start of year') = DA...
eicu
CREATE TABLE tourist_attraction_features ( tourist_attraction_id number, feature_id number ) CREATE TABLE shops ( shop_id number, shop_details text ) CREATE TABLE street_markets ( market_id number, market_details text ) CREATE TABLE visits ( visit_id number, tourist_attraction_id numb...
SELECT name, opening_hours FROM tourist_attractions WHERE how_to_get_there = "bus" OR how_to_get_there = "walk"
spider
CREATE TABLE table_48690 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the country that the player with a score of 70-69=139 from?
SELECT "Country" FROM table_48690 WHERE "Score" = '70-69=139'
wikisql
CREATE TABLE table_name_23 ( ifop_5_11_09 VARCHAR, opinionway_5_11_09 VARCHAR, ipsos_3_14_09 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the lfop 5/11/09 with opinion way of 5/11/09 of 2% and lpsos 3/14/09 of 2%
SELECT ifop_5_11_09 FROM table_name_23 WHERE opinionway_5_11_09 = "2%" AND ipsos_3_14_09 = "2%"
sql_create_context
CREATE TABLE table_name_93 ( entrant VARCHAR, engine VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who used Gordini Straight-6 in 1956?
SELECT entrant FROM table_name_93 WHERE engine = "gordini straight-6" AND year = 1956
sql_create_context
CREATE TABLE table_train_51 ( "id" int, "active_infection" bool, "procalcitonin" int, "oliguria" bool, "receiving_vasopressor" bool, "metabolic_acidosis" bool, "colonized_with_a_multi_drug_resistant_organism" bool, "hypoperfusion" bool, "central_venous_oxygen_saturation_scvo2" int, ...
SELECT * FROM table_train_51 WHERE procalcitonin >= 3
criteria2sql
CREATE TABLE party ( Party_ID int, Minister text, Took_office text, Left_office text, Region_ID int, Party_name text ) CREATE TABLE party_events ( Event_ID int, Event_Name text, Party_ID int, Member_in_charge_ID int ) CREATE TABLE region ( Region_ID int, Region_name tex...
SELECT Took_office, COUNT(Took_office) FROM party GROUP BY Minister ORDER BY COUNT(Took_office)
nvbench
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 wdmzjzjlb.ZYZYZDZZBM, wdmzjzjlb.ZYZYZDZZMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '41737510564' UNION SELECT bdmzjzjlb.ZYZYZDZZBM, bdmzjzjlb.ZYZYZDZZMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '41737510564'
css
CREATE TABLE table_27714 ( "User" text, "Unit (kWh)/Time range" text, "Tariff ( Rs. /kWh)" text, "Fixed Charge ( Rs. /kWh)" text, "Fuel Adjustment Charge (% of Total Energy Charge)" text, "Max. Demand Charge ( Rs. /kVA)" text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT "Fixed Charge ( Rs. /kWh)" FROM table_27714 WHERE "Unit (kWh)/Time range" = 'I-2: Peak (18:30-22:30)'
wikisql
CREATE TABLE table_11608735_3 ( state_ VARCHAR, _federal VARCHAR, property_taxes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the state and federal when property taxes is 17,199,210
SELECT state_ & _federal FROM table_11608735_3 WHERE property_taxes = "17,199,210"
sql_create_context
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM 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 te...
SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_...
css
CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway ( Railway_ID int, Railway ...
SELECT Name, COUNT(Name) FROM train GROUP BY Name ORDER BY COUNT(Name)
nvbench
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(2...
SELECT FIRST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT DESC
nvbench
CREATE TABLE table_1579922_1 ( episode VARCHAR, run_time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What episode had a run time of 24:25?
SELECT episode FROM table_1579922_1 WHERE run_time = "24:25"
sql_create_context
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId ...
SELECT p.Id, Score, Title, 'http://travel.stackexchange.com/questions/' + CAST(p.Id AS VARCHAR(10)) AS link FROM Posts AS p WHERE DeletionDate IS NULL AND ClosedDate IS NULL AND Tags LIKE '%identify%' AND AcceptedAnswerId IS NULL AND Score <= 2 AND CreationDate <= DATEADD(mm, -2, GETDATE()) ORDER BY CreationDate, Score
sede
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( ...
SELECT OwnerUserId, COUNT(Posts.Id) AS NumPosts, SUM(Posts.Score) AS SumScore, AVG(CAST(Posts.Score AS FLOAT)) AS AvgScore, STDEV(Posts.Score) AS StdDevScore, AVG(CAST(Posts.Score AS FLOAT)) - STDEV(Posts.Score) AS "avg-stdev" FROM Posts WHERE Posts.OwnerUserId IN (3123370, 3605516, 3915549, 4831567) AND PostTypeId = 2...
sede
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeou...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-31752...
eicu
CREATE TABLE table_29728596_1 ( location VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the home match against FK Rudar Ugljevik played?
SELECT location FROM table_29728596_1 WHERE away_team = "FK Rudar Ugljevik"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT demographic.admission_type, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "4611"
mimicsql_data
CREATE TABLE table_name_90 ( year VARCHAR, position VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year of school is the forward Iman McFarland?
SELECT year FROM table_name_90 WHERE position = "forward" AND name = "iman mcfarland"
sql_create_context
CREATE TABLE table_79055 ( "Name or route" text, "type" text, "elevation groundstation" real, "elevation mountainstation" real, "slope length" real, "capacity in persons/hour" real, "construction year(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT AVG("elevation groundstation") FROM table_79055 WHERE "capacity in persons/hour" > '820' AND "Name or route" = 'lager 1' AND "slope length" < '336'
wikisql
CREATE TABLE table_name_63 ( feb VARCHAR, city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the Feb temperatures in East Stroudsburg?
SELECT feb FROM table_name_63 WHERE city = "east stroudsburg"
sql_create_context
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.QTY * t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '63314892456'
css
CREATE TABLE table_2691 ( "Rnd" real, "Date" text, "Race Name" text, "Length" text, "Track" text, "Location" text, "Pole Position" text, "Winning Driver" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the track is the Wisconsin State ...
SELECT "Location" FROM table_2691 WHERE "Winning Driver" = 'Wally Dallenbach' AND "Track" = 'Wisconsin State Fair Park Speedway'
wikisql
CREATE TABLE table_204_707 ( id number, "year" number, "english title" text, "chinese title" text, "director" text, "role" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what film did the actor star in after street angel ?
SELECT "english title" FROM table_204_707 WHERE id = (SELECT id FROM table_204_707 WHERE "english title" = 'street angel') + 1
squall
CREATE TABLE aircraft ( Aircraft_ID int(11), Aircraft varchar(50), Description varchar(50), Max_Gross_Weight varchar(50), Total_disk_area varchar(50), Max_disk_Loading varchar(50) ) CREATE TABLE match ( Round real, Location text, Country text, Date text, Fastest_Qualifying t...
SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY Aircraft
nvbench
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-240586')) AND treatment.treatmentname = 'external pacemaker' ...
eicu
CREATE TABLE table_63015 ( "Title" text, "Series" text, "Director" text, "Release date" text, "reissue?" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was Tree Cornered Tweety, directed by Friz Freleng, released?
SELECT "Release date" FROM table_63015 WHERE "Director" = 'friz freleng' AND "Title" = 'tree cornered tweety'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16572')) AND NOT vitalperiodic.systemicdiastoli...
eicu
CREATE TABLE table_35568 ( "Version" text, "Length" text, "Album" text, "Remixed by" text, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What the highest Year with a Remixed by Laurent Boutonnat?
SELECT MAX("Year") FROM table_35568 WHERE "Remixed by" = 'laurent boutonnat'
wikisql
CREATE TABLE table_13821 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank was the swimmer in lane 4?
SELECT "Rank" FROM table_13821 WHERE "Lane" = '4'
wikisql
CREATE TABLE table_78427 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many grids does dave walker have?
SELECT COUNT("Grid") FROM table_78427 WHERE "Driver" = 'dave walker'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerU...
SELECT CreationDate, Id AS "post_link" FROM Posts AS p WHERE OwnerDisplayName = '##NomeDoUsuario:string##' AND PostTypeId = 2 ORDER BY CreationDate
sede
CREATE TABLE table_2156758_4 ( title VARCHAR, written_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many titles were written by Don Shank and Genndy Tartakovsky?
SELECT COUNT(title) FROM table_2156758_4 WHERE written_by = "Don Shank and Genndy Tartakovsky"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReas...
SELECT SUBSTRING(p.Title, 1, STR_POSITION(p.Title, ' ')) AS FirstWord, COUNT(DISTINCT p.Id) AS Questions, CAST(AVG(p.Score * 1.0) AS FLOAT(10, 1)) AS AvgScore, CAST(AVG(p.AnswerCount * 1.0) AS FLOAT(10, 1)) AS AvgAnswerCount, CAST(AVG(p.CommentCount * 1.0) AS FLOAT(10, 1)) AS AvgCommentCount, CAST(AVG(p.ViewCount * 1.0...
sede
CREATE TABLE table_66517 ( "Name" text, "GP-GS" text, "Receptions" real, "Long" real, "Avg/G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times is avg/g 2?
SELECT COUNT("Receptions") FROM table_66517 WHERE "Avg/G" = '2'
wikisql
CREATE TABLE table_204_409 ( id number, "date" text, "race name" text, "location" text, "uci rating" number, "winner" text, "team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which was the only race held in cameroon ?
SELECT "race name" FROM table_204_409 WHERE "location" = 'cameroon'
squall
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id numb...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i...
mimic_iii
CREATE TABLE table_2562572_39 ( largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ethnic group is ?
SELECT largest_ethnic_group__2002_ FROM table_2562572_39 WHERE cyrillic_name_other_names = "Конак"
sql_create_context
CREATE TABLE table_name_6 ( year VARCHAR, runner_up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year shows as Runner-up of england (24 pts)?
SELECT year FROM table_name_6 WHERE runner_up = "england (24 pts)"
sql_create_context
CREATE TABLE table_68107 ( "Year" text, "Team" text, "TTkl" real, "Solo" real, "Sacks" real, "Pass Def" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many sacks have 2006 as the year, and a solo less than 62?
SELECT SUM("Sacks") FROM table_68107 WHERE "Year" = '2006' AND "Solo" < '62'
wikisql
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,...
SELECT MED_CLINIC_ID FROM t_kc24 WHERE PERSON_ID = '52604335' AND CLINIC_SLT_DATE BETWEEN '2010-01-31' AND '2015-12-04'
css
CREATE TABLE table_name_76 ( wins INTEGER, top_25 VARCHAR, events VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of wins that has a top-25 of 13 and events less than 32?
SELECT MAX(wins) FROM table_name_76 WHERE top_25 = 13 AND events < 32
sql_create_context