instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_19977 ( "No." real, "English name" text, "Bulgarian name" text, "Bulgarian name ( Transliteration )" text, "Old Bulgarian Names" text, "Old Bulgarian name (Transliteration)" text, "Old Bulgarian name - Meaning" text ) -- Using valid SQLite, answer the following questions...
SELECT "Old Bulgarian Names" FROM table_19977 WHERE "Bulgarian name ( Transliteration )" = 'Yanuari'
wikisql
CREATE TABLE table_35995 ( "Code" text, "Vehicle" text, "Year" text, "Displacement" text, "Bore" text, "Stroke" text, "C.R." text, "Max. Power" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What stroke has a max power of 109 ps(80kw)@40...
SELECT "Stroke" FROM table_35995 WHERE "Max. Power" = '109 ps(80kw)@4000 rpm'
wikisql
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE TagSynonyms ( Id number...
SELECT TagName, SUM(CASE WHEN Posts.CommunityOwnedDate IS NULL OR Votes.CreationDate < Posts.CommunityOwnedDate THEN 1 ELSE 0 END) AS NonWikiUpvotes, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Post...
sede
CREATE TABLE table_53293 ( "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. -- How big was the crowd when Richmond was the away...
SELECT "Crowd" FROM table_53293 WHERE "Away team" = 'richmond'
wikisql
CREATE TABLE table_29295 ( "Episode No. Episode No. refers to the episodes number in the overall series, whereas Series No. refers to the episodes number in this particular series." real, "Series No." real, "Episode" text, "Director" text, "Writer(s)" text, "Original airdate" text ) -- Using v...
SELECT COUNT("Writer(s)") FROM table_29295 WHERE "Episode" = 'Peace, Brother'
wikisql
CREATE TABLE table_201_36 ( id number, "year" number, "title" text, "role" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which year had the most credits ?
SELECT "year" FROM table_201_36 GROUP BY "year" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_4684 ( "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. -- Where did Hawthorn play as the away team?
SELECT "Venue" FROM table_4684 WHERE "Away team" = 'hawthorn'
wikisql
CREATE TABLE table_21315 ( "Game" real, "Date" text, "Opponent" 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. -- Na...
SELECT "Record" FROM table_21315 WHERE "Date" = 'June 7'
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 COUNT(*) FROM (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '6607183' AND zyjybgb.BGRQ BETWEEN '2004-04-06' AND '2016-04-25' GROUP BY zyjybgb.KSBM HAVING COUNT(*) <= 13 UNION SELECT mzjybgb.KSBM FROM mzjz...
css
CREATE TABLE table_14620 ( "Celebrity" text, "Background" text, "Original Team" text, "Hometown" text, "Result" text, "Raised" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much did the Hydra team from Bronx, New York raise?
SELECT "Raised" FROM table_14620 WHERE "Original Team" = 'hydra' AND "Hometown" = 'bronx, new york'
wikisql
CREATE TABLE table_name_75 ( away_team VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team for the game with a score of 139-119?
SELECT away_team FROM table_name_75 WHERE score = "139-119"
sql_create_context
CREATE TABLE table_6743 ( "Buechel & Manhart spelling (pronunciation)" text, "Ullrich" text, "Brandon University" text, "Deloria & Boas" text, "Dakota Mission" text, "Rood & Taylor" text, "Riggs" text, "Williamson" text, "University of Minnesota" text, "White Hat" text ) -- Usi...
SELECT "University of Minnesota" FROM table_6743 WHERE "Deloria & Boas" = 'n'
wikisql
CREATE TABLE table_11900773_4 ( denomination VARCHAR, theme VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What denominations are the stamps with themes opera, l opold simoneau and pierrette alarie?
SELECT denomination FROM table_11900773_4 WHERE theme = "Opera, Léopold Simoneau and Pierrette Alarie"
sql_create_context
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
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 hz_info.YLJGDM = '0345841' AND NOT mzjzjlb.JZKSMC LIKE '%室%'
css
CREATE TABLE Photos ( Photo_ID INTEGER, Tourist_Attraction_ID INTEGER, Name VARCHAR(255), Description VARCHAR(255), Filename VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Hotels ( hotel_id INTEGER, star_rating_code CHAR(15), pets_allowed_yn CHAR(1), price_range real, ...
SELECT Visit_Date, COUNT(Visit_Date) FROM Visits ORDER BY Visit_Date
nvbench
CREATE TABLE table_name_9 ( bronze VARCHAR, nation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many bronzes did netherlands win?
SELECT bronze FROM table_name_9 WHERE nation = "netherlands"
sql_create_context
CREATE TABLE table_23259 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Primary Conference" text, "LEC Sport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the school in...
SELECT "Founded" FROM table_23259 WHERE "Location" = 'Salem, Massachusetts'
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_MED_SER_ORG_NO = '9923455' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 12
css
CREATE TABLE table_41281 ( "Season" text, "Skip" text, "Third" text, "Second" text, "Lead" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Lead for the 1999 00 season?
SELECT "Lead" FROM table_41281 WHERE "Season" = '1999–00'
wikisql
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, ...
SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '91823210' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2008-05-03')
css
CREATE TABLE table_28019988_2 ( series__number VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the series number for the episode with production code bdf109?
SELECT series__number FROM table_28019988_2 WHERE production_code = "BDF109"
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, ic...
SELECT 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 = '030-58018')) AND diagnosis.diagnosisname = 'malignancy - cancer w...
eicu
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport 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, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTI...
atis
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost numbe...
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 = '027-136480')) AND lab.labname = 'peak airway/pressure' AND DATETIME(lab.labresulttime, '...
eicu
CREATE TABLE table_name_17 ( lane INTEGER, country VARCHAR, react VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest lane for Nigeria, with a react less than 0.133?
SELECT MIN(lane) FROM table_name_17 WHERE country = "nigeria" AND react < 0.133
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'furosemide 20 mg po tabs')
eicu
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, ...
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 = '017-9785')) AND vitalperiodic.sao2 > 88.0 AND NOT v...
eicu
CREATE TABLE table_18228 ( "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. -- Which incumbent was first elected in 1958?
SELECT "Incumbent" FROM table_18228 WHERE "First elected" = '1958'
wikisql
CREATE TABLE table_name_15 ( name VARCHAR, bodyweight VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which person has a bodyweight of 73.6?
SELECT name FROM table_name_15 WHERE bodyweight = 73.6
sql_create_context
CREATE TABLE table_33842 ( "Kanji" text, "Name (Translation)" text, "Builder" text, "Laid down" text, "Launched" text, "Completed" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date that the item was laid down if it was launched on ...
SELECT "Laid down" FROM table_33842 WHERE "Launched" = '1899-04-25'
wikisql
CREATE TABLE table_68856 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the ICAO for IATA of ccu
SELECT "ICAO" FROM table_68856 WHERE "IATA" = 'ccu'
wikisql
CREATE TABLE roles ( role_code text, role_name text, role_description text ) CREATE TABLE employees ( employee_id number, role_code text, employee_name text, gender_mfu text, date_of_birth time, other_details text ) CREATE TABLE ref_document_types ( document_type_code text, ...
SELECT COUNT(*) FROM employees
spider
CREATE TABLE table_1341690_35 ( candidates VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the candidates in the district won by the incumbent Del Latta?
SELECT candidates FROM table_1341690_35 WHERE incumbent = "Del Latta"
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.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJL...
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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '病理性赌博' AND jyjgzbb.JCZBDM = '294608'
css
CREATE TABLE table_11214772_2 ( location VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the final game played in 2007
SELECT location FROM table_11214772_2 WHERE year = 2007
sql_create_context
CREATE TABLE home_game ( year INTEGER, league_id TEXT, team_id TEXT, park_id TEXT, span_first TEXT, span_last TEXT, games INTEGER, openings INTEGER, attendance INTEGER ) CREATE TABLE college ( college_id TEXT, name_full TEXT, city TEXT, state TEXT, country TEXT )...
SELECT year, SUM(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year DESC
nvbench
CREATE TABLE table_49015 ( "Name" text, "Nationality" text, "Position" text, "S\u00e3o Paulo career" text, "Appearances" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT SAN PAULO CAREER HAD SMALLER THAN 201 APPEARANCES, SMALLER...
SELECT "S\u00e3o Paulo career" FROM table_49015 WHERE "Appearances" < '201' AND "Goals" < '2' AND "Name" = 'ricardo rocha'
wikisql
CREATE TABLE table_58183 ( "Nationality" text, "Position" text, "Tottenham Hotspur career" text, "Club Apps" text, "Goals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many goals did the player with 229 club apps have?
SELECT "Goals" FROM table_58183 WHERE "Club Apps" = '229'
wikisql
CREATE TABLE table_64103 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which points has place smaller than 2?
SELECT "Points" FROM table_64103 WHERE "Place" < '2'
wikisql
CREATE TABLE table_name_80 ( points INTEGER, entrant VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points after 1960 for fred tuck cars?
SELECT MAX(points) FROM table_name_80 WHERE entrant = "fred tuck cars" AND year > 1960
sql_create_context
CREATE TABLE table_2263 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the writers of episode 20?
SELECT "Written by" FROM table_2263 WHERE "No. in season" = '20'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'zofran' AND patient.uniquepid = '013-29301' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TI...
eicu
CREATE TABLE table_203_759 ( id number, "year" number, "company" text, "number of members affected" number, "duration of strike" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how long were employees of nynex on strike ?
SELECT "duration of strike" FROM table_203_759 WHERE "company" = 'nynex'
squall
CREATE TABLE table_14901 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent with a series of 1-0?
SELECT "Opponent" FROM table_14901 WHERE "Series" = '1-0'
wikisql
CREATE TABLE table_25800134_9 ( series__number VARCHAR, airdate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of series where the airdate is december 26, 1964?
SELECT COUNT(series__number) FROM table_25800134_9 WHERE airdate = "December 26, 1964"
sql_create_context
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 wdmzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN wdmzjzjlb 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 WHERE person_info.XM = '韩依然' UNION SELECT bdmzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN bdmzjzjlb ON person_in...
css
CREATE TABLE table_2850912_10 ( player VARCHAR, nhl_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player was drafted by the New York Rangers?
SELECT player FROM table_2850912_10 WHERE nhl_team = "New York Rangers"
sql_create_context
CREATE TABLE table_name_44 ( finish VARCHAR, stage INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Give the Finish for a Stage that is larger than 15
SELECT finish FROM table_name_44 WHERE stage > 15
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) C...
SELECT p.Id, p.Title, p.ViewCount FROM Posts AS p INNER JOIN Tags AS t ON t.TagName = '##TagName##' INNER JOIN PostTags AS pt ON pt.PostId = p.Id AND pt.TagId = t.Id WHERE p.PostTypeId = 1 AND p.Body LIKE '%##SearchTerm##%' OR p.Title LIKE '%##SearchTerm##%' ORDER BY p.CreationDate DESC
sede
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), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT LAST_NAME, SALARY FROM employees WHERE FIRST_NAME LIKE '%m' ORDER BY LAST_NAME
nvbench
CREATE TABLE table_9697 ( "Scorer" text, "Club" text, "League goals" text, "FA Cup goals" real, "League Cup goals" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which League Cup goals have a Scorer of ken houghton, and an FA Cup g...
SELECT MAX("League Cup goals") FROM table_9697 WHERE "Scorer" = 'ken houghton' AND "FA Cup goals" < '0'
wikisql
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT 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 = '45714321' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2014-09-08')
css
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 AVG(demographic.age) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.diagnosis = "GASTROINTESTINAL BLEED"
mimicsql_data
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ...
SELECT TIME_TO_STR(P.CreationDate, '%YEAR') AS PostYear, TIME_TO_STR(P.CreationDate, '%-mONT%-H') AS PostMonth, COUNT(*) AS Posts, SUM(AnswerCount) AS AnswerSum, SUM(CommentCount) AS CommentSum, MIN(FavoriteCount) AS FavoriteMin, AVG(FavoriteCount) AS FavoriteAvg, MAX(FavoriteCount) AS FavoriteMax, SUM(FavoriteCount) A...
sede
CREATE TABLE table_name_87 ( score VARCHAR, game VARCHAR, high_rebounds VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score for the Game less than 21, and of antonio davis (12)had the High rebounds?
SELECT score FROM table_name_87 WHERE game < 21 AND high_rebounds = "antonio davis (12)"
sql_create_context
CREATE TABLE table_23284271_11 ( high_rebounds VARCHAR, location_attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the high rebounds for american airlines center 20,557
SELECT high_rebounds FROM table_23284271_11 WHERE location_attendance = "American Airlines Center 20,557"
sql_create_context
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int,...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_28601467_1 ( runner_up VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the runner-up record where winner record is Ireland 59 points?
SELECT runner_up FROM table_28601467_1 WHERE winner = "Ireland 59 points"
sql_create_context
CREATE TABLE table_203_715 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times did they rank below 8th place ?
SELECT COUNT(*) FROM table_203_715 WHERE "position" > 8
squall
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE ...
SELECT COUNT(*) > 0 FROM course, program, program_course WHERE course.department = 'ENVIRON' AND course.number = 102 AND program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
advising
CREATE TABLE table_name_28 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the score 29-7?
SELECT date FROM table_name_28 WHERE score = "29-7"
sql_create_context
CREATE TABLE table_37447 ( "School" text, "Mascot" text, "Location" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What school is located in Michigan City?
SELECT "School" FROM table_37447 WHERE "Location" = 'michigan city'
wikisql
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Posts ( Id nu...
SELECT Id AS "post_link", FavoriteCount, CAST(CAST(CAST(FavoriteCount AS FLOAT) * 4 AS INT) AS TEXT(3)) + '%' AS Favorite, CAST(FavoriteCount AS TEXT(3)) + '%' AS Stellar FROM Posts WHERE PostTypeId = 1 AND FavoriteCount > 0 ORDER BY FavoriteCount DESC LIMIT 500
sede
CREATE TABLE txmzjzjlb ( 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, MZZYZDZ...
SELECT jybgb.SHSJ FROM hz_info JOIN txmzjzjlb JOIN jybgb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '47198797' AND jybgb.BGRQ BETWEEN '2007-11-06' AND '2012-...
css
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE...
SELECT * FROM Posts
sede
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Insertion of one vascular stent"
mimicsql_data
CREATE TABLE field ( fieldid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREA...
SELECT DISTINCT venueid FROM paper WHERE title = 'Fracture of acrylic bone cement'
scholar
CREATE TABLE table_41161 ( "Rank" real, "Country" text, "1st place" real, "2nd place" real, "3rd place" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average 1st place with a Rank that is larger than 10?
SELECT AVG("1st place") FROM table_41161 WHERE "Rank" > '10'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, ...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3929) AND prescriptions.route = 'ou' AND STRFTIME('%y-%m', prescriptions.startdate) <= '2105-01' ORDER BY prescriptions.startdate LIMIT 1
mimic_iii
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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.MED_SER_ORG_NO = '5713275' AND qtb.OUT_DIAG_DIS_CD = 'Y71.248' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.MED_SER_ORG_NO = '5713275' AND gyb.OUT_DIAG_DIS_CD = 'Y71.248' UNION...
css
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( YLJGDM text, YLJGDM_M...
SELECT JZZDBM, JZZDSM FROM mzjzjlb WHERE JZLSH = '70688038255'
css
CREATE TABLE table_10069 ( "City" text, "Province" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ICAO has a Province of heilongjiang, and a IATA of jmu?
SELECT "ICAO" FROM table_10069 WHERE "Province" = 'heilongjiang' AND "IATA" = 'jmu'
wikisql
CREATE TABLE table_1825751_4 ( second_runner_up VARCHAR, binibining_pilipinas_world VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was second runner up when Janina San Miguel won Binibining Pilipinas-World?
SELECT second_runner_up FROM table_1825751_4 WHERE binibining_pilipinas_world = "Janina San Miguel"
sql_create_context
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 COUNT(qtb.IN_DIAG_DIS_CD) FROM qtb WHERE qtb.PERSON_ID = '17722570' AND qtb.IN_HOSP_DATE BETWEEN '2004-12-03' AND '2015-08-20' UNION SELECT COUNT(gyb.IN_DIAG_DIS_CD) FROM gyb WHERE gyb.PERSON_ID = '17722570' AND gyb.IN_HOSP_DATE BETWEEN '2004-12-03' AND '2015-08-20' UNION SELECT COUNT(zyb.IN_DIAG_DIS_CD) FROM zy...
css
CREATE TABLE table_name_45 ( position VARCHAR, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the position of the person whose hometown is Queens, NY?
SELECT position FROM table_name_45 WHERE hometown = "queens, ny"
sql_create_context
CREATE TABLE table_36359 ( "Virtue" text, "Latin" text, "Gloss" text, "(Vice)" text, "(Latin)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Virtue has a (vice) of lust?
SELECT "Virtue" FROM table_36359 WHERE "(Vice)" = 'lust'
wikisql
CREATE TABLE table_name_81 ( result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Result has a Date of september 3, 2000?
SELECT result FROM table_name_81 WHERE date = "september 3, 2000"
sql_create_context
CREATE TABLE table_2159 ( "Election" text, "# of candidates nominated" real, "# of seats won" real, "# of total votes" real, "% of popular vote" text, "result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most # of seats won
SELECT MAX("# of seats won") FROM table_2159
wikisql
CREATE TABLE table_294 ( "Player" text, "Position" text, "School" text, "Hometown" text, "MLB Draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What school did the catcher attend?
SELECT "School" FROM table_294 WHERE "Position" = 'Catcher'
wikisql
CREATE TABLE dorm_amenity ( amenity_name VARCHAR, amenid VARCHAR ) CREATE TABLE has_amenity ( dormid VARCHAR, amenid VARCHAR ) CREATE TABLE dorm ( dormid VARCHAR, dorm_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of ame...
SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name
sql_create_context
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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, insuranc...
SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51497) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ptt') AND STRFTIME('%y-%m', labevents.charttime) = '2105-07'
mimic_iii
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "311"
mimicsql_data
CREATE TABLE table_name_70 ( date VARCHAR, loco_nos VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the number of locomotives 421-6?
SELECT date FROM table_name_70 WHERE loco_nos = "421-6"
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 MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '马文敏' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '盐酸帕罗西汀片')
css
CREATE TABLE table_name_32 ( total INTEGER, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest total that has 1977 as the year (s) won?
SELECT MIN(total) FROM table_name_32 WHERE year_s__won = "1977"
sql_create_context
CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Movie ( mID int, title text, year int, director text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For e...
SELECT director, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" ORDER BY stars
nvbench
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "31" AND lab.itemid = "50935"
mimicsql_data
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT * 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 AND zyjybgb.YLJGDM = jyjgzb...
css
CREATE TABLE table_name_34 ( erp___power_w VARCHAR, frequency VARCHAR, facility_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of ERP/Power W for frequency of 89.3 fm and facility ID less than 40430
SELECT COUNT(erp___power_w) FROM table_name_34 WHERE frequency = "89.3 fm" AND facility_id < 40430
sql_create_context
CREATE TABLE table_71610 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the host team on October 4?
SELECT "Host Team" FROM table_71610 WHERE "Date" = 'october 4'
wikisql
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 jyjgzbb.JCFF 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_in...
css
CREATE TABLE table_name_93 ( gold INTEGER, bronze VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest gold when bronze is 1, and rank is 5?
SELECT MAX(gold) FROM table_name_93 WHERE bronze = 1 AND rank = 5
sql_create_context
CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_from DATETIME, date_to DATETIME ) CREATE TABLE Product_Suppliers ( product_id INTEGER, supplier_id INTEGER, date_supplied_from DATETIME, date_supplied_to DATETIME, total_amount_purchased VARCHAR(80), ...
SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code
nvbench
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '016-34475' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaladmittime LIMIT 1
eicu
CREATE TABLE table_59222 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Venue, when Opposing Teams is 'South Africa', and when Date is '17/06/2000'?
SELECT "Venue" FROM table_59222 WHERE "Opposing Teams" = 'south africa' AND "Date" = '17/06/2000'
wikisql
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug = "Sucralfate"
mimicsql_data
CREATE TABLE table_22714 ( "Rank" real, "Peak" text, "Country" text, "Island" text, "Elevation (m)" real, "Prominence (m)" real, "Col (m)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest value for col(m) at North Island?
SELECT MAX("Col (m)") FROM table_22714 WHERE "Island" = 'North Island'
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.admission_type, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "62296"
mimicsql_data
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 = '0149091' 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 = '0149091' AND t_kc22.SOC_S...
css