instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_55782 ( "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 day did North Melbourne play as the home te...
SELECT "Date" FROM table_55782 WHERE "Home team" = 'north melbourne'
wikisql
CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE student ( stu_num number, stu...
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 requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jo...
SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, program_course AS PROGRAM_COURSEalias0...
advising
CREATE TABLE table_name_86 ( segment_a VARCHAR, netflix VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which segment a's Netflix is S05E22?
SELECT segment_a FROM table_name_86 WHERE netflix = "s05e22"
sql_create_context
CREATE TABLE table_name_17 ( wins VARCHAR, points INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Wins, when Points is less than 1?
SELECT COUNT(wins) FROM table_name_17 WHERE points < 1
sql_create_context
CREATE TABLE journalist ( Nationality VARCHAR, Years_working VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of the journalist with the largest number of years working?
SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1
sql_create_context
CREATE TABLE table_3983 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What original air date was the episod...
SELECT "Original air date" FROM table_3983 WHERE "Production code" = '5.05'
wikisql
CREATE TABLE qtb ( 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(qtb.IN_DIAG_DIS_CD) FROM qtb WHERE qtb.PERSON_NM = '赵嘉怡' AND qtb.IN_HOSP_DATE BETWEEN '2011-09-05' AND '2018-01-10' UNION SELECT COUNT(gyb.IN_DIAG_DIS_CD) FROM gyb WHERE gyb.PERSON_NM = '赵嘉怡' AND gyb.IN_HOSP_DATE BETWEEN '2011-09-05' AND '2018-01-10' UNION SELECT COUNT(zyb.IN_DIAG_DIS_CD) FROM zyb WHERE zy...
css
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Neutral
nvbench
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_re...
SELECT DISTINCT airport_service.miles_distant FROM airport, airport_service, city WHERE airport.airport_code = 'SLC' AND airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY'
atis
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 SOC_SRT_DIRE_NM, EACH_DOSAGE, USE_FRE FROM t_kc22 WHERE MED_CLINIC_ID = '46360643910'
css
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, Dele...
SELECT * FROM PostHistory WHERE PostHistoryTypeId = 12 LIMIT 100
sede
CREATE TABLE table_35852 ( "Name" text, "Hanzi" text, "Hanyu Pinyin" text, "Population (2010-11-01)" text, "Area (km\u00b2)" text, "Density (/km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the population as of 11-01-2010 for B...
SELECT "Population (2010-11-01)" FROM table_35852 WHERE "Name" = 'bayan county'
wikisql
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 instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
advising
CREATE TABLE table_61947 ( "English name" text, "Thai name" text, "Transcription" text, "Color" text, "Sanskrit word" text, "Planet" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the Thai name of wan phruehatsabodi?
SELECT "Thai name" FROM table_61947 WHERE "Transcription" = 'wan phruehatsabodi'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE prescriptions ( row_id num...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
mimic_iii
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, ...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8324 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = '...
mimic_iii
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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Opn rt hemicolectomy NEC"
mimicsql_data
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text )...
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 WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CHARLOTTE' AND date_day.day_number = 27 AND date_day.month_number = 8 AND...
atis
CREATE TABLE school ( school_id number, grade text, school text, location text, type text ) CREATE TABLE school_bus ( school_id number, driver_id number, years_working number, if_full_time others ) CREATE TABLE driver ( driver_id number, name text, party text, home_...
SELECT name FROM driver ORDER BY age DESC
spider
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypernatremia - due to volume depletion' AND DATETIM...
eicu
CREATE TABLE table_11934032_1 ( registrations VARCHAR, station_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are all the registrations where station number is c26
SELECT registrations FROM table_11934032_1 WHERE station_number = "C26"
sql_create_context
CREATE TABLE qtb ( 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 * FROM qtb WHERE qtb.PERSON_ID = '05426415' AND qtb.MED_SER_ORG_NO = '7025827' AND qtb.MED_ORG_DEPT_NM LIKE '%喉%' UNION SELECT * FROM gyb WHERE gyb.PERSON_ID = '05426415' AND gyb.MED_SER_ORG_NO = '7025827' AND gyb.MED_ORG_DEPT_NM LIKE '%喉%' UNION SELECT * FROM zyb WHERE zyb.PERSON_ID = '05426415' AND zyb.MED_SER...
css
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Baclofen"
mimicsql_data
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, lan...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
mimic_iii
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 varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), ...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE table_2102945_1 ( viewers__in_millions_ VARCHAR, run_time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 24:31 is the run time how many millions of viewers are there?
SELECT viewers__in_millions_ FROM table_2102945_1 WHERE run_time = "24:31"
sql_create_context
CREATE TABLE table_name_25 ( team_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 1st leg for a team 1 of Teteks?
SELECT 1 AS st_leg FROM table_name_25 WHERE team_1 = "teteks"
sql_create_context
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT Posts.Score, Posts.Id AS "post_link", Posts.CreationDate, Posts.LastEditDate FROM PostHistory JOIN Posts ON PostHistory.PostId = Posts.Id WHERE PostHistory.PostHistoryTypeId = 6 AND PostHistory.Text LIKE '%<featured>%' GROUP BY Posts.Score, Posts.Id, Posts.CreationDate, Posts.LastEditDate ORDER BY Posts.LastEdit...
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '花和豫' AND t_kc22.STA_DATE BETWEEN '2009-01-20' AND '2018-02-07' AND t_kc22.SOC_SRT_DIRE_CD = '904255'
css
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, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT zzmzjzjlb.JZJSSJ FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '51166395425' UNION SELECT fzzmzjzjlb.JZJSSJ FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '51166395425'
css
CREATE TABLE table_32640 ( "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 home team plays at glenferrie oval?
SELECT "Home team" FROM table_32640 WHERE "Venue" = 'glenferrie oval'
wikisql
CREATE TABLE table_203_156 ( id number, "team" text, "outgoing manager" text, "manner of departure" text, "date of vacancy" text, "replaced by" text, "date of appointment" text, "position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "manner of departure" FROM table_203_156 WHERE "team" = 'plymouth argyle' AND "outgoing manager" = 'ian holloway'
squall
CREATE TABLE table_name_32 ( player VARCHAR, to_par VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player was from England with a to par of +1?
SELECT player FROM table_name_32 WHERE to_par = "+1" AND country = "england"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.language = "SPAN" AND demographic.diagnosis = "ST-SEGMENT ELEVATION MYOCARDIAL INFARCTION\CARDIAC CATH"
mimicsql_data
CREATE TABLE table_40558 ( "Country" text, "Laws against homosexuality" text, "Penalty" text, "Same-sex Unions" text, "Laws against discrimination" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What law has a penalty of in Iraq?
SELECT "Laws against homosexuality" FROM table_40558 WHERE "Penalty" = '—' AND "Country" = 'iraq'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-40638') AND NOT patient.unitdischargetime IS ...
eicu
CREATE TABLE table_16065 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Vikings points" real, "Opponents" real, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The record of 9-4 was against which ...
SELECT "Opponent" FROM table_16065 WHERE "Record" = '9-4'
wikisql
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_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '周泰和' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费'
css
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_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) ...
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 3
mimic_iii
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 WHERE demographic.marital_status = "DIVORCED" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"
mimicsql_data
CREATE TABLE table_22900 ( "Series No." real, "Season No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.K. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the series number ...
SELECT MIN("Series No.") FROM table_22900 WHERE "Season No." = '2'
wikisql
CREATE TABLE table_name_49 ( to_par VARCHAR, place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par for Jiyai Shin in place t1?
SELECT to_par FROM table_name_49 WHERE place = "t1" AND player = "jiyai shin"
sql_create_context
CREATE TABLE table_53283 ( "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 the away team at Princes Park?
SELECT "Away team" FROM table_53283 WHERE "Venue" = 'princes park'
wikisql
CREATE TABLE table_13039 ( "Average population (x 1000)" real, "Live births" text, "Deaths" text, "Natural change" text, "Crude birth rate (per 1000)" real, "Crude death rate (per 1000)" real, "Natural change (per 1000)" real ) -- Using valid SQLite, answer the following questions for the ...
SELECT "Live births" FROM table_13039 WHERE "Crude birth rate (per 1000)" > '15.7' AND "Average population (x 1000)" < '297' AND "Deaths" = '4 686'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '18784112' AND hz_info.YLJGDM = '0131624' AND mzjzjlb.JZKSMC LIKE '%神外%'
css
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 COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '10110310' AND t_kc22.STA_DATE BETWEEN '2004-07-21' AND '2008-06-22' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_I...
css
CREATE TABLE rent_arrears ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many council taxes are collected for renting arrears ?
SELECT COUNT(*) FROM rent_arrears
sql_create_context
CREATE TABLE table_26427332_17 ( place VARCHAR, contestant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries are in the ranking for jacqueline kohl?
SELECT COUNT(place) FROM table_26427332_17 WHERE contestant = "Jacqueline Kohl"
sql_create_context
CREATE TABLE table_20885 ( "Episode #" text, "Original airdate (UK)" text, "Episode title" text, "Doctor Who episode" text, "Webcast link" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes have the title 'the world of who'?
SELECT COUNT("Episode #") FROM table_20885 WHERE "Episode title" = 'The World of Who'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE restriction ( restriction_c...
SELECT COUNT(DISTINCT flight.flight_id) FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.city_cod...
atis
CREATE TABLE table_name_81 ( location VARCHAR, college_or_campus_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Location has a College or Campus Name of anna university - tharamani campus?
SELECT location FROM table_name_81 WHERE college_or_campus_name = "anna university - tharamani campus"
sql_create_context
CREATE TABLE table_42544 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date that has a Outcome of winner, and a la b y kak ay wa...
SELECT "Date" FROM table_42544 WHERE "Outcome" = 'winner' AND "Opponent in the final" = 'çağla büyükakçay'
wikisql
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...
SELECT 'site://posts/' + CAST(P.Id AS TEXT) + '/revisions|' + 'Revision History for Post ' + CAST(P.Id AS TEXT) AS "revision_link", P.Id AS "post_link", P.LastEditorUserId AS "user_link", P.LastEditDate FROM Posts AS P INNER JOIN PostHistory AS H ON H.PostId = P.Id WHERE P.OwnerUserId != @userid AND P.LastEditorUserId ...
sede
CREATE TABLE PostHistoryTypes ( Id number, Name text ) 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 ...
SELECT RAR.* FROM (SELECT c.Id AS "comment_link", c.Text FROM Comments AS c INNER JOIN Posts AS p ON c.PostId = p.Id INNER JOIN Posts AS p1 ON p.ParentId = p1.Id WHERE (Text LIKE '%fuck%') AND LENGTH(Text) < 500 AND 'p1'."closeddate" IS NULL ORDER BY LENGTH(Text) DESC LIMIT 3420) AS RAR ORDER BY LENGTH(Text)
sede
CREATE TABLE table_5678 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the population is great...
SELECT SUM("Number of households") FROM table_5678 WHERE "Population" > '146,445' AND "County" = 'carroll'
wikisql
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 text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "MIDA100" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE Documents_to_be_Destroyed ( Document_ID INTEGER, Destruction_Authorised_by_Employee_ID INTEGER, Destroyed_by_Employee_ID INTEGER, Planned_Destruction_Date DATETIME, Actual_Destruction_Date DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME...
SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(*)
nvbench
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, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT * FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_12822 ( "Election" text, "1st Member" text, "1st Party" text, "2nd Member" text, "2nd Party" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 1st Party, when 2nd Party is 'Liberal', and when 1st Member is 'James Kershaw'?
SELECT "1st Party" FROM table_12822 WHERE "2nd Party" = 'liberal' AND "1st Member" = 'james kershaw'
wikisql
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 text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.expire_flag, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "25167"
mimicsql_data
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE dataset ( datasetid...
SELECT DISTINCT dataset.datasetid FROM dataset, keyphrase, paperdataset, paperkeyphrase WHERE keyphrase.keyphrasename = 'textual entailment' AND paperdataset.datasetid = dataset.datasetid AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paperkeyphrase.paperid = paperdataset.paperid
scholar
CREATE TABLE table_26555 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed episode numbe...
SELECT "Directed by" FROM table_26555 WHERE "No. in series" = '179'
wikisql
CREATE TABLE table_name_30 ( in_state_area VARCHAR, outlet VARCHAR, _percentage_in_state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With an outlet of Colorado River and a % instate of a038 84.8% what is in-state area?
SELECT in_state_area FROM table_name_30 WHERE outlet = "colorado river" AND _percentage_in_state = "a038 84.8%"
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE >= 25)
css
CREATE TABLE table_204_577 ( id number, "name" text, "first operational" text, "numeral system" text, "computing mechanism" text, "programming" text, "turing complete" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the first compute...
SELECT "name" FROM table_204_577 WHERE "numeral system" = 'decimal' ORDER BY "first operational" LIMIT 1
squall
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 qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_NM = '沈敏博' GROUP BY qtb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_NM = '沈敏博' GROUP BY gyb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT zyb.MED_SER_ORG_NO FROM zyb WHERE zyb.PERSON_NM = '沈敏博' GROUP BY zyb.MED_...
css
CREATE TABLE table_name_14 ( place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Anders Forsbrand's Place?
SELECT place FROM table_name_14 WHERE player = "anders forsbrand"
sql_create_context
CREATE TABLE table_name_90 ( athlete VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The time of 8:34.27 was set by what athlete?
SELECT athlete FROM table_name_90 WHERE time = "8:34.27"
sql_create_context
CREATE TABLE table_40363 ( "Round" text, "Opposition" text, "First leg" text, "Second leg" text, "Aggregate score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opposing team in the 3rd round?
SELECT "Opposition" FROM table_40363 WHERE "Round" = '3rd'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT txmzjzjlb.SG, txmzjzjlb.TZ FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '钱康复' UNION SELECT ftxmzjzjlb.SG, ftxmzjzjlb.TZ FROM person_info JOIN hz_info JOIN ...
css
CREATE TABLE table_name_89 ( year VARCHAR, chassis VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of year for chassis of kurtis kraft 4000 and points more than 2
SELECT COUNT(year) FROM table_name_89 WHERE chassis = "kurtis kraft 4000" AND points > 2
sql_create_context
CREATE TABLE table_name_61 ( average INTEGER, lowest VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Lowest larger than 288, and a Team of east stirlingshire has what lowest average?
SELECT MIN(average) FROM table_name_61 WHERE lowest > 288 AND team = "east stirlingshire"
sql_create_context
CREATE TABLE table_name_43 ( timeslot VARCHAR, finale VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What time did the season finale air on May 20, 2003?
SELECT timeslot FROM table_name_43 WHERE finale = "may 20, 2003"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE l...
SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =...
eicu
CREATE TABLE personfriend ( name text, friend text, year number ) CREATE TABLE person ( name text, age number, city text, gender text, job text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name and age of the person who is a frien...
SELECT T1.name, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'
spider
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.long_title = "Endovascular (total) embolization or occlusion of head and neck vessels"
mimicsql_data
CREATE TABLE table_15055594_6 ( fall_09 INTEGER, fall_07 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of students in Fall 09 from the state that had 3940 in Fall 07?
SELECT MAX(fall_09) FROM table_15055594_6 WHERE fall_07 = 3940
sql_create_context
CREATE TABLE table_52149 ( "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 score was conceded by Richmond?
SELECT "Away team score" FROM table_52149 WHERE "Home team" = 'richmond'
wikisql
CREATE TABLE PostHistoryTypes ( Id number, Name text ) 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 ...
SELECT Score, CreationDate, Tags FROM Posts WHERE Posts.Score > 100 AND PostTypeId = 1 AND CreationDate > '2017-01-01'
sede
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, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '柏哲茂' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2019-02-14')
css
CREATE TABLE table_name_95 ( competition VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- During what competition was a game played with a score of 3 1?
SELECT competition FROM table_name_95 WHERE score = "3–1"
sql_create_context
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_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 mzjzjlb.ZZYSGH, mzjzjlb.QTJZYSGH FROM mzjzjlb WHERE mzjzjlb.JZLSH = '18548556313'
css
CREATE TABLE table_56511 ( "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 team had a score of 18.12 (120) when they p...
SELECT "Home team" FROM table_56511 WHERE "Home team score" = '18.12 (120)'
wikisql
CREATE TABLE table_74047 ( "No." real, "Title" text, "Directed by" text, "Story by" text, "Teleplay by" text, "Original air date" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number for simon cellan...
SELECT "No." FROM table_74047 WHERE "Directed by" = 'Simon Cellan Jones'
wikisql
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT SG, TZ, TW, SSY, SZY, XL, HXPLC, ML FROM mzjzjlb WHERE JZLSH = '08031682316'
css
CREATE TABLE table_name_34 ( result VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the result for harrogate
SELECT result FROM table_name_34 WHERE location = "harrogate"
sql_create_context
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '64675893' AND t_kc22.STA_DATE BETWEEN '2006-03-30' AND '2013-06-05' AND t_kc21.MED_SER_ORG_NO = '0643879' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE table_9907 ( "Generation" text, "Birthday" text, "Birthplace" text, "Blood Type" text, "Agency" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the birthplace of the third (2009) generation member from the lespros entertainment ag...
SELECT "Birthplace" FROM table_9907 WHERE "Agency" = 'lespros entertainment' AND "Generation" = 'third (2009)'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT Posts.Id AS "post_link", AVG(Posts.Score) AS "score", COUNT(*) AS "close_votes", MIN(Votes.CreationDate) AS "first_vote", MAX(Votes.CreationDate) AS "last_vote" FROM Posts INNER JOIN Votes ON Posts.Id = Votes.PostId WHERE Votes.VoteTypeId = 6 AND Posts.ClosedDate IS NULL AND Posts.Tags LIKE '%<php>%' GROUP BY Po...
sede
CREATE TABLE table_31177 ( "Player" text, "Starts" real, "Cuts made" real, "Best finish" text, "Money list rank" real, "Earnings ($)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the money list rank for player Doug Barron?
SELECT MAX("Money list rank") FROM table_31177 WHERE "Player" = 'Doug Barron'
wikisql
CREATE TABLE table_3449 ( "Country" text, "Population in 2011 (In thousands)" real, "GDP (nominal) in 2011 ( USD millions)" real, "GDP (nominal) per capita" real, "GDP (PPP) in 2011 ( USD millions)" real, "GDP (PPP) per capita" real, "Merchandise exports ($ billions), 2011" text, "Mercha...
SELECT MIN("GDP (PPP) per capita") FROM table_3449
wikisql
CREATE TABLE table_40038 ( "Country" text, "Local name" text, "Host" text, "Network" text, "Date premiered" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Country has a Network of nelonen?
SELECT "Country" FROM table_40038 WHERE "Network" = 'nelonen'
wikisql
CREATE TABLE table_15339 ( "Client" text, "Years of Operation" text, "Area of Operation" text, "Country" text, "Services" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country did the client Agiba-agip work in?
SELECT "Country" FROM table_15339 WHERE "Client" = 'agiba-agip'
wikisql
CREATE TABLE table_203_789 ( id number, "season" text, "team" text, "country" text, "division" number, "apps" number, "goals" number, "assists" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what team got 0 assists ?
SELECT "team" FROM table_203_789 WHERE "assists" = 0
squall
CREATE TABLE table_26586 ( "#" text, "Player" text, "Country" text, "Score" text, "To par" real, "Winnings ($)" real, "After" real, "Before" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latest after when the player is Steve...
SELECT MAX("After") FROM table_26586 WHERE "Player" = 'Steve Stricker'
wikisql
CREATE TABLE table_name_23 ( score VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score for the opponent Vancouver Canucks?
SELECT score FROM table_name_23 WHERE opponent = "vancouver canucks"
sql_create_context
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName
nvbench
CREATE TABLE table_train_227 ( "id" int, "gender" string, "diabetic" string, "allergic_to_study_products" bool, "hba1c" float, "a1c" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- an a1c score greater than 7 ...
SELECT * FROM table_train_227 WHERE a1c > 7 AND a1c < 14
criteria2sql
CREATE TABLE table_name_81 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 1987 result for the tournament with 1986 result of 3R and 1989 of A?
SELECT 1987 FROM table_name_81 WHERE 1989 = "a" AND 1986 = "3r"
sql_create_context