instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_96 ( tie_no VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the tie number when bradford park avenue was the away team?
SELECT tie_no FROM table_name_96 WHERE away_team = "bradford park avenue"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND lab.label = "Protein/Creatinine Ratio"
mimicsql_data
CREATE TABLE table_27400 ( "Language" text, "Sorata Municipality" text, "Guanay Municipality" text, "Tacacoma Municipality" text, "Quiabaya Municipality" text, "Combaya Municipality" text, "Tipuani Municipality" text, "Mapiri Municipality" text, "Teoponte Municipality" text ) -- Us...
SELECT "Combaya Municipality" FROM table_27400 WHERE "Quiabaya Municipality" = '2'
wikisql
CREATE TABLE table_name_50 ( team_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the 1st leg of team 1 alajuelense?
SELECT 1 AS st_leg FROM table_name_50 WHERE team_1 = "alajuelense"
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 jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyj...
css
CREATE TABLE table_57475 ( "Character" text, "Actor" text, "First Episode" text, "Final Episode" text, "Episode Count" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the last episode featuring Rob Estes?
SELECT "Final Episode" FROM table_57475 WHERE "Actor" = 'rob estes'
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JY...
css
CREATE TABLE table_79530 ( "Region" text, "Date" text, "Label" text, "Format(s)" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which formats have a region of Europe and Catalog value of WEBB185?
SELECT "Format(s)" FROM table_79530 WHERE "Region" = 'europe' AND "Catalog" = 'webb185'
wikisql
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId nu...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%philadelphia%' ORDER BY Reputation DESC
sede
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patie...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'chest pain - r/o myocardial ischemia' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURR...
eicu
CREATE TABLE document_types ( document_type_code text, document_description text ) CREATE TABLE organisation_types ( organisation_type text, organisation_type_description text ) CREATE TABLE staff_roles ( role_code text, role_description text ) CREATE TABLE research_outcomes ( outcome_cod...
SELECT COUNT(*), T1.project_details FROM projects AS T1 JOIN tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id
spider
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY COUNT(HIRE_DATE)
nvbench
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyeve...
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE STRFTIME('%y', prescriptions.startdate) = '2101' GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 3
mimic_iii
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicatio...
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'amiodarone hcl 150 mg/3ml iv soln')) AND DATET...
eicu
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 t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_NM, MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '9581134' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_NM ORDER BY MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) D...
css
CREATE TABLE table_9400 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the away team when there are 15 ties?
SELECT "Away team" FROM table_9400 WHERE "Tie no" = '15'
wikisql
CREATE TABLE table_name_77 ( methyl_red VARCHAR, species VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the methyl red reading for proteus mirabilis?
SELECT methyl_red FROM table_name_77 WHERE species = "proteus mirabilis"
sql_create_context
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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,...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(EMPLOYEE_ID)
nvbench
CREATE TABLE table_name_96 ( year INTEGER, venue VARCHAR, event VARCHAR, competition VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years had a 100 m hurdles event at the world championships in Osaka, Japan?
SELECT SUM(year) FROM table_name_96 WHERE event = "100 m hurdles" AND competition = "world championships" AND venue = "osaka, japan"
sql_create_context
CREATE TABLE table_203_815 ( id number, "pick #" number, "nfl team" text, "player" text, "position" text, "college" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- dwight scheyer was the player drafter previous to who ?
SELECT "player" FROM table_203_815 WHERE "pick #" = (SELECT "pick #" FROM table_203_815 WHERE "player" = 'dwight scheyer') + 1
squall
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 * FROM t_kc21 WHERE MED_SER_ORG_NO = '0611704' AND IN_HOSP_DATE BETWEEN '2012-09-14' AND '2016-11-27') EXCEPT (SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '0611704' AND IN_HOSP_DATE BETWEEN '2012-09-14' AND '2016-11-27' AND MED_ORG_DEPT_CD = '4564')
css
CREATE TABLE table_name_10 ( name VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Name that has the Rank of 4?
SELECT name FROM table_name_10 WHERE rank = 4
sql_create_context
CREATE TABLE table_4887 ( "Year" text, "Player" text, "Nationality" text, "Position" text, "Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What nationality did Greg Inglis hold?
SELECT "Nationality" FROM table_4887 WHERE "Player" = 'greg inglis'
wikisql
CREATE TABLE table_name_1 ( retail_name VARCHAR, chipset_based_on VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Retail name with a Chipset based on with radeon 9200?
SELECT retail_name FROM table_name_1 WHERE chipset_based_on = "radeon 9200"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'buffered lidocaine 1%' AND DATETIME(medication.drug...
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '74583279' AND qtb.MED_SER_ORG_NO = '4072141' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '74583279' AND gyb.MED_SER_ORG_NO = '4072...
css
CREATE TABLE Staff_Roles ( role_code VARCHAR(10), role_description VARCHAR(255) ) CREATE TABLE Document_Types ( document_type_code VARCHAR(10), document_description VARCHAR(255) ) CREATE TABLE Documents ( document_id INTEGER, document_type_code VARCHAR(10), grant_id INTEGER, sent_date ...
SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details ORDER BY T2.organisation_details DESC
nvbench
CREATE TABLE table_61338 ( "Women" text, "Country" text, "Season" text, "Victories" real, "Downhill" text, "Super G" text, "Giant Slalom" text, "Slalom" text, "Combined" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me ...
SELECT "Combined" FROM table_61338 WHERE "Victories" = '14'
wikisql
CREATE TABLE Addresses ( address_id INTEGER, line_1_number_building VARCHAR(80), city VARCHAR(50), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50) ) CREATE TABLE Products ( product_id INTEGER, product_type_code VARCHAR(15), product_name VARCHAR(80), ...
SELECT product_name, COUNT(product_name) FROM Products GROUP BY product_name ORDER BY COUNT(product_name) DESC
nvbench
CREATE TABLE table_1965650_8 ( nhl_team VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What NHL team did jim koleff play on?
SELECT nhl_team FROM table_1965650_8 WHERE player = "Jim Koleff"
sql_create_context
CREATE TABLE table_test_14 ( "id" int, "bleeding" int, "intra_aortic_balloon_pump_iabp" bool, "systolic_blood_pressure_sbp" int, "haemoglobin" float, "severe_hypertension" bool, "platelets" int, "neutrophil_count" int, "renal_disease" bool, "severe_thrombocytopenia" bool, "fa...
SELECT * FROM table_test_14 WHERE low_density_lipoprotein_ldl_cholesterol < 130
criteria2sql
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_...
SELECT DISTINCT airport_code FROM airport WHERE airport_code = 'TPA'
atis
CREATE TABLE table_name_86 ( verb VARCHAR, proto_austronesian VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the verb for the Proto-Austronesian word *diri?
SELECT verb FROM table_name_86 WHERE proto_austronesian = "*diri"
sql_create_context
CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE PROFESSOR ( EMP_NUM int, ...
SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE
nvbench
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'albumin, ascites'))
mimic_iii
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 400 AND 400 + 100 AND semester.semester IN ('SP', 'SU', 'SS') AND semester.semester_i...
advising
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.language = "SPAN" AND lab.label = "Alkaline Phosphatase"
mimicsql_data
CREATE TABLE table_20224 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- IN HOW MANY ISSUES WAS HARRISON FORD THE INTERVIEW SU...
SELECT COUNT("Date") FROM table_20224 WHERE "Interview subject" = 'Harrison Ford'
wikisql
CREATE TABLE table_name_72 ( date VARCHAR, result VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the Result of 3 2, with a Score of 6 0, 6 4?
SELECT date FROM table_name_72 WHERE result = "3–2" AND score = "6–0, 6–4"
sql_create_context
CREATE TABLE table_25647137_2 ( touchdowns VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many touchdowns did bill culligan have?
SELECT COUNT(touchdowns) FROM table_25647137_2 WHERE player = "Bill Culligan"
sql_create_context
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 (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '3530897' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING AVG(gwyjzb.IN_HOSP_DAYS) > 26 UNION SELECT fgwyjzb.MED_ORG_DEPT_CD FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '3530897' GROUP BY fgwyjzb.MED_ORG_DEPT_CD HAVING AVG(fgwyjzb.IN_H...
css
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREAT...
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) = '2103' GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 4
eicu
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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 t...
SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '36953184780'
css
CREATE TABLE table_1929755_1 ( wins VARCHAR, winnings VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many teams won $2,089,556?
SELECT COUNT(wins) FROM table_1929755_1 WHERE winnings = "$2,089,556"
sql_create_context
CREATE TABLE table_name_32 ( location_attendance VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location attendance when the team is Golden State?
SELECT location_attendance FROM table_name_32 WHERE team = "golden state"
sql_create_context
CREATE TABLE actor ( aid int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE written_by ( id int, msid int, wid int ) CREATE TABLE tv_series ( sid int, title text, release_year int, num_of_seasons int, num_of_episodes in...
SELECT birth_year FROM actor WHERE name = 'Benedict Cumberbatch'
imdb
CREATE TABLE table_name_78 ( gold INTEGER, silver INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest number of gold medals when there were 0 silver medals?
SELECT MAX(gold) FROM table_name_78 WHERE silver < 0
sql_create_context
CREATE TABLE Third_Party_Companies ( company_id INTEGER, company_type VARCHAR(5), company_name VARCHAR(255), company_address VARCHAR(255), other_company_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_description VARCHAR(255) ) CREATE TABLE ...
SELECT fault_short_name, COUNT(fault_short_name) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY fault_short_name
nvbench
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 = '8187686' AND zyjybgb.BGRQ BETWEEN '2013-10-06' AND '2017-08-03' GROUP BY zyjybgb.KSBM HAVING COUNT(*) > 23 UNION SELECT mzjybgb.KSBM FROM mzjzj...
css
CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text ) CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABL...
SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1
spider
CREATE TABLE Ref_Transaction_Types ( transaction_type_code VARCHAR(10), transaction_type_description VARCHAR(80) ) CREATE TABLE Investors ( investor_id INTEGER, Investor_details VARCHAR(255) ) CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE...
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions ORDER BY COUNT(date_of_transaction)
nvbench
CREATE TABLE table_31691 ( "Pick #" real, "MLS team" text, "Player" text, "Position" text, "Affiliation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the sum of pick number for kenny arena
SELECT SUM("Pick #") FROM table_31691 WHERE "Player" = 'kenny arena'
wikisql
CREATE TABLE table_1507423_5 ( top_10 INTEGER, team_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where does team #55/#83 robby gordon motorsports rank in the top 10?
SELECT MAX(top_10) FROM table_1507423_5 WHERE team_s_ = "#55/#83 Robby Gordon Motorsports"
sql_create_context
CREATE TABLE table_11960407_4 ( record VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was the game 39?
SELECT COUNT(record) FROM table_11960407_4 WHERE game = 39
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJ...
css
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5161684' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-11-17' AND '2007-11-12' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5161684' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-11-17' AND '2007-11-12' AND t_kc21.IN_DIAG_DIS_CD = t_kc21.OUT_DIAG_DIS_CD
css
CREATE TABLE table_51148 ( "Tribunal" text, "Number of autos da f\u00e9 with known sentences" text, "Executions in persona" text, "Executions in effigie" text, "Penanced" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many exec...
SELECT "Executions in persona" FROM table_51148 WHERE "Number of autos da f\u00e9 with known sentences" = '2 (1543–1544)'
wikisql
CREATE TABLE Person ( name VARCHAR ) CREATE TABLE PersonFriend ( name VARCHAR, friend VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of persons who are friends with Bob.
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT Headquarter, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC
nvbench
CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE manager ( Manager_...
SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival ORDER BY Arrival DESC
nvbench
CREATE TABLE Assessment_Notes ( notes_id INTEGER, student_id INTEGER, teacher_id INTEGER, date_of_notes DATETIME, text_of_notes VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Ref_Address_Types ( address_type_code VARCHAR(15), address_type_description VARCHAR(80) ) CREATE TABLE...
SELECT date_address_to, AVG(monthly_rental) FROM Student_Addresses GROUP BY date_address_to ORDER BY monthly_rental DESC
nvbench
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABL...
SELECT * FROM (SELECT COUNT(Id) AS UserCount, Location FROM Users AS u GROUP BY Location) AS K ORDER BY UserCount DESC
sede
CREATE TABLE table_61216 ( "Rank" real, "Club" text, "Years" real, "Games" real, "\u00d8-Pts" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the rank for 1.26 -Pts in game 1458?
SELECT COUNT("Rank") FROM table_61216 WHERE "\u00d8-Pts" > '1.26' AND "Games" = '1458'
wikisql
CREATE TABLE table_56845 ( "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 record for the game on November 28 when the decision ...
SELECT "Record" FROM table_56845 WHERE "Decision" = 'backstrom' AND "Date" = 'november 28'
wikisql
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT u.Id, u.Reputation FROM Users AS u JOIN Badges AS b ON u.Id = b.UserId WHERE b.Name = 'php' AND b.Class = 1 ORDER BY u.Reputation
sede
CREATE TABLE table_54597 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the college for the player that went to ridge community high school and is defensive back?
SELECT "College" FROM table_54597 WHERE "Position" = 'defensive back' AND "School" = 'ridge community high school'
wikisql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '邹承天' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC
css
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'Y85.622' AND jyjgzbb.JCZBMC = '低密度脂蛋白胆固醇' UNION SELECT jyjgzbb.C...
css
CREATE TABLE table_name_72 ( gold VARCHAR, bronze INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Hold many gold had more than 16 bronzes?
SELECT COUNT(gold) FROM table_name_72 WHERE bronze > 16
sql_create_context
CREATE TABLE table_26487 ( "Year" real, "Putri Pariwisata Indonesia" text, "1st Runner Up" text, "2nd Runner Up" text, "3rd Runner Up" text, "4th Runner Up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won 2nd place when ratna mariana won ...
SELECT "1st Runner Up" FROM table_26487 WHERE "2nd Runner Up" = 'Ratna Mariana'
wikisql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '46443043' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_67739 ( "Island" text, "Nickname" text, "Area" text, "Population (as of 2010)" real, "Highest point" text, "Elevation" text, "Age ( Ma )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the nickname with age of 4.9
SELECT "Nickname" FROM table_67739 WHERE "Age ( Ma )" = '4.9'
wikisql
CREATE TABLE table_name_30 ( number_of_clubs INTEGER, season VARCHAR, total_wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the number of clubs in seasons before 1992 with more than 3 total wins?
SELECT SUM(number_of_clubs) FROM table_name_30 WHERE season < 1992 AND total_wins > 3
sql_create_context
CREATE TABLE table_35541 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the total number of picks for a guard with fewer than 6 rounds?
SELECT COUNT("Pick #") FROM table_35541 WHERE "Position" = 'guard' AND "Round" < '6'
wikisql
CREATE TABLE table_28846752_5 ( bbi VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many 10wi and bbi is 6/101
SELECT COUNT(10 AS wi) FROM table_28846752_5 WHERE bbi = "6/101"
sql_create_context
CREATE TABLE table_name_33 ( opponent VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent at the game with a score of 35-14?
SELECT opponent FROM table_name_33 WHERE score = "35-14"
sql_create_context
CREATE TABLE table_name_98 ( iata VARCHAR, icao VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the IATA code for the city with ICAO code of RCMQ?
SELECT iata FROM table_name_98 WHERE icao = "rcmq"
sql_create_context
CREATE TABLE table_204_353 ( id number, "no." number, "date/time" text, "aircraft" text, "foe" text, "result" text, "location" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in the month of december 1917 , what confirmed vi...
SELECT "location" FROM table_204_353 WHERE id = (SELECT id FROM table_204_353 WHERE "location" = 'asiago') - 1
squall
CREATE TABLE table_32033 ( "Chip" text, "Flash size" text, "EEPROM" real, "SRAM" real, "Frequency [MHz]" real, "Package" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the package for EEPROM less than 128
SELECT "Package" FROM table_32033 WHERE "EEPROM" < '128'
wikisql
CREATE TABLE table_60802 ( "Episode" text, "1 season" text, "2 season" text, "3 season" text, "4 season" text, "5 season" text, "6 season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 5 Season, when 2 Season is '3 168 673 (2 April ...
SELECT "5 season" FROM table_60802 WHERE "2 season" = '3 168 673 (2 april 2008)'
wikisql
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE aircraft ( aircraft_code varchar,...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MINNEAPOLIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'I...
atis
CREATE TABLE table_13927 ( "SEASON" text, "TEAM" text, "LEAGUE" text, "GAMES" text, "GOALS" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Season with goals of 6 and BCLA as the league?
SELECT "SEASON" FROM table_13927 WHERE "LEAGUE" = 'bcla' AND "GOALS" = '6'
wikisql
CREATE TABLE table_70469 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score of the event where Brian Kamm was the runner-up?
SELECT "Winning score" FROM table_70469 WHERE "Runner(s)-up" = 'brian kamm'
wikisql
CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway_manage ( R...
SELECT Builder, COUNT(Builder) FROM railway GROUP BY Builder ORDER BY Builder
nvbench
CREATE TABLE table_name_83 ( pronunciation_a VARCHAR, word VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the pronunciation for
SELECT pronunciation_a FROM table_name_83 WHERE word = "傳"
sql_create_context
CREATE TABLE table_name_53 ( finalists VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the finalists in the 1972 73 season?
SELECT finalists FROM table_name_53 WHERE season = "1972–73"
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '72363456' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 7610.85)
css
CREATE TABLE table_32111 ( "Year" real, "Play" text, "Role" text, "Theatre" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the role for tea and sympathy
SELECT "Role" FROM table_32111 WHERE "Play" = 'tea and sympathy'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3369 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND charteve...
mimic_iii
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_...
SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 100 AND 100 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se...
advising
CREATE TABLE table_name_22 ( year VARCHAR, film VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Year of the Film Belle of the Nineties?
SELECT year FROM table_name_22 WHERE film = "belle of the nineties"
sql_create_context
CREATE TABLE table_17736 ( "Year" real, "Song title" text, "Artist" text, "Master recording ?" text, "Release date" text, "Single / Pack" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many singles have a song titled 'Antisocial'?
SELECT "Single / Pack" FROM table_17736 WHERE "Song title" = 'Antisocial'
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 hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '68417064' AND txmzjzjlb.JZKSRQ BETWEEN '2009-12-28' AND '2021-09-30' AND txmzjzjlb.YLJGDM = '1278762' UNION SELECT COUNT(*) FROM hz_info JOIN ftxmzjzjlb ON...
css
CREATE TABLE table_name_90 ( attendance VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Attendance has an Opponent of swindon wildcats?
SELECT COUNT(attendance) FROM table_name_90 WHERE opponent = "swindon wildcats"
sql_create_context
CREATE TABLE table_train_45 ( "id" int, "child_pugh_class" string, "consent" bool, "renal_disease" bool, "hepatic_disease" bool, "intestinal_obstruction" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- chronic ...
SELECT * FROM table_train_45 WHERE intestinal_obstruction = 1
criteria2sql
CREATE TABLE table_44954 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How long was the time for the Legacy Fighting Champ...
SELECT "Time" FROM table_44954 WHERE "Event" = 'legacy fighting championship 12'
wikisql
CREATE TABLE table_73808 ( "No. in series" real, "No. in 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. -- Name the most number in se...
SELECT MAX("No. in season") FROM table_73808 WHERE "Directed by" = 'Leslie Hill'
wikisql
CREATE TABLE table_65358 ( "Brand" text, "Product Name" text, "Focal Length" text, "35mm EFL and equivalent aperture" text, "Max. aperture" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the brand of the slr magic hyperprime cine 35mm t0.95,...
SELECT "Brand" FROM table_65358 WHERE "Focal Length" = '35mm' AND "Product Name" = 'slr magic hyperprime cine 35mm t0.95'
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 zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND 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 ...
css
CREATE TABLE ftxmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZD...
SELECT txmzjzjlb.KH, txmzjzjlb.KLX FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '00282220286' UNION SELECT ftxmzjzjlb.KH, ftxmzjzjlb.KLX FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '00282220286'
css