input
stringlengths
12
517
instruction
stringlengths
38
7.14k
response
stringlengths
22
3.27k
Which Webcast has a Callsign of kgbt?
CREATE TABLE table_name_91 ( webcast VARCHAR, callsign VARCHAR )
SELECT webcast FROM table_name_91 WHERE callsign = "kgbt"
A bar chart shows the distribution of All_Home and the average of School_ID , and group by attribute All_Home, rank by the names in asc.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) 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 )
SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY All_Home
What is the Position with a height of less than 183, and a weight of less than 91 kg and born in bloomington, minnesota?
CREATE TABLE table_name_73 ( position VARCHAR, birthplace VARCHAR, height__cm_ VARCHAR, weight__kg_ VARCHAR )
SELECT position FROM table_name_73 WHERE height__cm_ < 183 AND weight__kg_ < 91 AND birthplace = "bloomington, minnesota"
List each donator name and the amount of endowment in descending order of the amount of endowment. Plot them as bar chart.
CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollment int, IHSAA_Class text, IHSAA_Football_Class text, County text ) CREATE TABLE budget ( School_id int, Year int, Budgeted int, total_budget_percent_budgeted real, Invested int, total_budget_percent_invested real, Budget_invested_percent text )
SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC
What is Race, when Winning Team is Chip Ganassi Racing, when Pole Position is Ryan Briscoe, and when Most Laps Led is Scott Dixon?
CREATE TABLE table_40553 ( "Race" text, "Pole position" text, "Fastest lap" text, "Most laps led" text, "Winning driver" text, "Winning team" text, "Report" text )
SELECT "Race" FROM table_40553 WHERE "Winning team" = 'chip ganassi racing' AND "Pole position" = 'ryan briscoe' AND "Most laps led" = 'scott dixon'
What is the position for the university of north carolina carolina dynamo affiliation
CREATE TABLE table_29626583_1 ( position VARCHAR, affiliation VARCHAR )
SELECT position FROM table_29626583_1 WHERE affiliation = "University of North Carolina Carolina Dynamo"
What is Date, when Opponent is 'Philadelphia 76ers'?
CREATE TABLE table_10027 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text )
SELECT "Date" FROM table_10027 WHERE "Opponent" = 'philadelphia 76ers'
What event was held in Chihuahua, Mexico?
CREATE TABLE table_name_16 ( event VARCHAR, venue VARCHAR )
SELECT event FROM table_name_16 WHERE venue = "chihuahua, mexico"
哪位医师是负责开具医疗就诊94275814777中费用明细项目53189607075,把医师的编码和姓名找出来
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 number, FLX_MED_ORG_ID text, MED_SER_ORG_NO text, CLINIC_TYPE text, MED_TYPE number, CLINIC_ID text, IN_DIAG_DIS_CD text, IN_DIAG_DIS_NM text, OUT_DIAG_DIS_CD text, OUT_DIAG_DIS_NM text, INPT_AREA_BED text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, OUT_DIAG_DOC_CD text, OUT_DIAG_DOC_NM text, MAIN_COND_DES text, INSU_TYPE text, IN_HOSP_DAYS number, MED_AMOUT number, FERTILITY_STS number, DATA_ID text, SYNC_TIME time, REIMBURSEMENT_FLG number, HOSP_LEV number, HOSP_STS number, INSURED_IDENTITY number, SERVANT_FLG text, TRADE_TYPE number, INSURED_STS text, REMOTE_SETTLE_FLG text ) CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text, VAL_UNIT text, DOSE_UNIT text, DOSE_FORM text, SPEC text, USE_FRE text, EACH_DOSAGE text, QTY number, UNIVALENT number, AMOUNT number, SELF_PAY_PRO number, RER_SOL number, SELF_PAY_AMO number, UP_LIMIT_AMO number, OVE_SELF_AMO number, EXP_OCC_DATE time, RECIPE_BILL_ID text, FLX_MED_ORG_ID text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, HOSP_DOC_CD text, HOSP_DOC_NM text, REF_STA_FLG number, DATA_ID text, SYNC_TIME time, PRESCRIPTION_CODE text, PRESCRIPTION_ID text, TRADE_TYPE number, STA_FLG number, STA_DATE time, REIMBURS_TYPE number, FXBZ number, REMOTE_SETTLE_FLG text ) 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 number, ILL_PAY number, CIVIL_SUBSIDY number, PER_SOL number, PER_EXP number, DATA_ID text, SYNC_TIME time, OUT_HOSP_DATE time, CLINIC_ID text, MED_TYPE number, INSURED_STS text, INSURED_IDENTITY number, TRADE_TYPE number, RECIPE_BILL_ID text, ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, REIMBURS_FLG number, SENDER_DEAL_ID text, RECEIVER_DEAL_ID text, SENDER_REVOKE_ID text, RECEIVER_REVOKE_ID text, SENDER_OFFSET_ID text, RECEIVER_OFFSET_ID text, LAS_OVE_PAY number, OVE_ADD_PAY number, SUP_ADD_PAY number, CKC102 number, CASH_PAY number, COM_ACC_PAY number, ENT_ACC_PAY number, ENT_PAY number, COM_PAY number, OLDC_FUND_PAY number, SPE_FUND_PAY number )
SELECT HOSP_DOC_CD, HOSP_DOC_NM FROM t_kc22 WHERE MED_EXP_DET_ID = '53189607075'
在2008-09-21到2015-12-28的这段时间,医疗机构7987100的总金额和统筹总金额分别是多少
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 number, FLX_MED_ORG_ID text, MED_SER_ORG_NO text, CLINIC_TYPE text, MED_TYPE number, CLINIC_ID text, IN_DIAG_DIS_CD text, IN_DIAG_DIS_NM text, OUT_DIAG_DIS_CD text, OUT_DIAG_DIS_NM text, INPT_AREA_BED text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, OUT_DIAG_DOC_CD text, OUT_DIAG_DOC_NM text, MAIN_COND_DES text, INSU_TYPE text, IN_HOSP_DAYS number, MED_AMOUT number, FERTILITY_STS number, DATA_ID text, SYNC_TIME time, REIMBURSEMENT_FLG number, HOSP_LEV number, HOSP_STS number, INSURED_IDENTITY number, SERVANT_FLG text, TRADE_TYPE number, INSURED_STS text, REMOTE_SETTLE_FLG text ) 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 number, ILL_PAY number, CIVIL_SUBSIDY number, PER_SOL number, PER_EXP number, DATA_ID text, SYNC_TIME time, OUT_HOSP_DATE time, CLINIC_ID text, MED_TYPE number, INSURED_STS text, INSURED_IDENTITY number, TRADE_TYPE number, RECIPE_BILL_ID text, ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, REIMBURS_FLG number, SENDER_DEAL_ID text, RECEIVER_DEAL_ID text, SENDER_REVOKE_ID text, RECEIVER_REVOKE_ID text, SENDER_OFFSET_ID text, RECEIVER_OFFSET_ID text, LAS_OVE_PAY number, OVE_ADD_PAY number, SUP_ADD_PAY number, CKC102 number, CASH_PAY number, COM_ACC_PAY number, ENT_ACC_PAY number, ENT_PAY number, COM_PAY number, OLDC_FUND_PAY number, SPE_FUND_PAY number ) CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text, VAL_UNIT text, DOSE_UNIT text, DOSE_FORM text, SPEC text, USE_FRE text, EACH_DOSAGE text, QTY number, UNIVALENT number, AMOUNT number, SELF_PAY_PRO number, RER_SOL number, SELF_PAY_AMO number, UP_LIMIT_AMO number, OVE_SELF_AMO number, EXP_OCC_DATE time, RECIPE_BILL_ID text, FLX_MED_ORG_ID text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, HOSP_DOC_CD text, HOSP_DOC_NM text, REF_STA_FLG number, DATA_ID text, SYNC_TIME time, PRESCRIPTION_CODE text, PRESCRIPTION_ID text, TRADE_TYPE number, STA_FLG number, STA_DATE time, REIMBURS_TYPE number, FXBZ number, REMOTE_SETTLE_FLG text )
SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7987100' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-09-21' AND '2015-12-28'
What is the average crowd size when the home team scored 9.20 (74)?
CREATE TABLE table_4772 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT AVG("Crowd") FROM table_4772 WHERE "Home team score" = '9.20 (74)'
In guangzhou, who won the game with a score of 1-0?
CREATE TABLE table_name_23 ( result VARCHAR, location VARCHAR, score VARCHAR )
SELECT result FROM table_name_23 WHERE location = "guangzhou" AND score = "1-0"
What is the sum of credit value of courses with more than one prerequisite for each department? Return a bar chart, and show in descending by the dept_name.
CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min numeric(2), end_hr numeric(2), end_min numeric(2) ) CREATE TABLE student ( ID varchar(5), name varchar(20), dept_name varchar(20), tot_cred numeric(3,0) ) CREATE TABLE department ( dept_name varchar(20), building varchar(15), budget numeric(12,2) ) CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE course ( course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0) ) CREATE TABLE takes ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), grade varchar(2) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_number varchar(7), time_slot_id varchar(4) ) CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0) ) CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) )
SELECT dept_name, SUM(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY dept_name ORDER BY dept_name DESC
统筹基金支出在医疗就诊30482936497中占医疗费总额百分之几?
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 number, ILL_PAY number, CIVIL_SUBSIDY number, PER_SOL number, PER_EXP number, DATA_ID text, SYNC_TIME time, OUT_HOSP_DATE time, CLINIC_ID text, MED_TYPE number, INSURED_STS text, INSURED_IDENTITY number, TRADE_TYPE number, RECIPE_BILL_ID text, ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, REIMBURS_FLG number, SENDER_DEAL_ID text, RECEIVER_DEAL_ID text, SENDER_REVOKE_ID text, RECEIVER_REVOKE_ID text, SENDER_OFFSET_ID text, RECEIVER_OFFSET_ID text, LAS_OVE_PAY number, OVE_ADD_PAY number, SUP_ADD_PAY number, CKC102 number, CASH_PAY number, COM_ACC_PAY number, ENT_ACC_PAY number, ENT_PAY number, COM_PAY number, OLDC_FUND_PAY number, SPE_FUND_PAY number ) CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text, VAL_UNIT text, DOSE_UNIT text, DOSE_FORM text, SPEC text, USE_FRE text, EACH_DOSAGE text, QTY number, UNIVALENT number, AMOUNT number, SELF_PAY_PRO number, RER_SOL number, SELF_PAY_AMO number, UP_LIMIT_AMO number, OVE_SELF_AMO number, EXP_OCC_DATE time, RECIPE_BILL_ID text, FLX_MED_ORG_ID text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, HOSP_DOC_CD text, HOSP_DOC_NM text, REF_STA_FLG number, DATA_ID text, SYNC_TIME time, PRESCRIPTION_CODE text, PRESCRIPTION_ID text, TRADE_TYPE number, STA_FLG number, STA_DATE time, REIMBURS_TYPE number, FXBZ number, REMOTE_SETTLE_FLG text ) 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 number, FLX_MED_ORG_ID text, MED_SER_ORG_NO text, CLINIC_TYPE text, MED_TYPE number, CLINIC_ID text, IN_DIAG_DIS_CD text, IN_DIAG_DIS_NM text, OUT_DIAG_DIS_CD text, OUT_DIAG_DIS_NM text, INPT_AREA_BED text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, OUT_DIAG_DOC_CD text, OUT_DIAG_DOC_NM text, MAIN_COND_DES text, INSU_TYPE text, IN_HOSP_DAYS number, MED_AMOUT number, FERTILITY_STS number, DATA_ID text, SYNC_TIME time, REIMBURSEMENT_FLG number, HOSP_LEV number, HOSP_STS number, INSURED_IDENTITY number, SERVANT_FLG text, TRADE_TYPE number, INSURED_STS text, REMOTE_SETTLE_FLG text )
SELECT (SELECT OVE_PAY FROM t_kc24 WHERE MED_CLINIC_ID = '30482936497') / (SELECT MED_AMOUT FROM t_kc24 WHERE MED_CLINIC_ID = '30482936497')
What is the lowest number of goals scored in regular league games by Ehiogu where he scored 0 goals in the FA Cup and at least 1 goal in the League Cup?
CREATE TABLE table_53430 ( "Name" text, "League" real, "FA Cup" real, "League Cup" real, "Total" real )
SELECT MIN("League") FROM table_53430 WHERE "FA Cup" = '0' AND "Total" = '1' AND "Name" = 'ehiogu' AND "League Cup" > '0'
had any medication been prescribed to patient 73713 since 09/2102?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) 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 icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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, language text, marital_status text, ethnicity text, age number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text )
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73713) AND STRFTIME('%y-%m', prescriptions.startdate) >= '2102-09'
give me the number of patients whose insurance is government and procedure icd9 code is 3771?
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 ) 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 text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.icd9_code = "3771"
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me the trend about department_id over hire_date with a line chart, and order by the X-axis in asc please.
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) 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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) )
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE
Which school are the Red Devils from?
CREATE TABLE table_name_24 ( school VARCHAR, team_name VARCHAR )
SELECT school FROM table_name_24 WHERE team_name = "red devils"
What's Albufeira's assist/pass?
CREATE TABLE table_name_22 ( assist_pass VARCHAR, location VARCHAR )
SELECT assist_pass FROM table_name_22 WHERE location = "albufeira"
What is the margin when periyakulam is the constituency?
CREATE TABLE table_22754491_1 ( margin VARCHAR, constituency VARCHAR )
SELECT margin FROM table_22754491_1 WHERE constituency = "Periyakulam"
Which Date has a Pictorials of mercedes mcnab, girls of hawaiian tropic?
CREATE TABLE table_name_67 ( date VARCHAR, pictorials VARCHAR )
SELECT date FROM table_name_67 WHERE pictorials = "mercedes mcnab, girls of hawaiian tropic"
If the area is 66.34, what is the minimum (2010 census) population?
CREATE TABLE table_232458_1 ( population__2010_census_ INTEGER, area__km²_ VARCHAR )
SELECT MIN(population__2010_census_) FROM table_232458_1 WHERE area__km²_ = "66.34"
What is the lowest Subject, when Plural is t der (their)?
CREATE TABLE table_44073 ( "Subject" real, "Proximity" text, "Honor" text, "Singular" text, "Plural" text )
SELECT MIN("Subject") FROM table_44073 WHERE "Plural" = 'tãder (their)'
Create a pie chart showing the total number across nationality.
CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int ) CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool )
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality
What traditional Chinese name would the Rock Records release Grown up Overnight be given?
CREATE TABLE table_65166 ( "Album#" text, "English Title" text, "Chinese (Traditional)" text, "Chinese (Simplified)" text, "Release date" text, "Label" text )
SELECT "Chinese (Traditional)" FROM table_65166 WHERE "Label" = 'rock records' AND "English Title" = 'grown up overnight'
How many teams did they play week 6
CREATE TABLE table_11391448_2 ( opponent VARCHAR, week VARCHAR )
SELECT COUNT(opponent) FROM table_11391448_2 WHERE week = 6
In the match where south melbourne was the away team, who was the home team?
CREATE TABLE table_56850 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Home team" FROM table_56850 WHERE "Away team" = 'south melbourne'
What tournament was Kirk Triplett a runner-up in?
CREATE TABLE table_47426 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "Tournament" FROM table_47426 WHERE "Runner(s)-up" = 'kirk triplett'
What school did the punter picked after 101 attend?
CREATE TABLE table_name_62 ( college VARCHAR, pick VARCHAR, position VARCHAR )
SELECT college FROM table_name_62 WHERE pick > 101 AND position = "punter"
What was the score of game 2?
CREATE TABLE table_name_5 ( score VARCHAR, game VARCHAR )
SELECT score FROM table_name_5 WHERE game = 2
find the names of programs whose origin is not in Beijing.
CREATE TABLE program ( name VARCHAR, origin VARCHAR )
SELECT name FROM program WHERE origin <> 'Beijing'
what is the marital status of Stephane Suchan?
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 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 ) 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 text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text )
SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Stephanie Suchan"
What was the share for the episode with the air date december 10, 2008?
CREATE TABLE table_171 ( "#" real, "Episode" text, "Air Date" text, "Timeslot (EST)" text, "Rating" text, "Share" text, "18\u201349 Rating" text, "Viewers (millions)" text, "Rank" text )
SELECT "Share" FROM table_171 WHERE "Air Date" = 'December 10, 2008'
I want the lead for others being 5%
CREATE TABLE table_name_58 ( lead VARCHAR, others VARCHAR )
SELECT lead FROM table_name_58 WHERE others = "5%"
A line chart for what are the number of the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?
CREATE TABLE customer ( customer_id SMALLINT UNSIGNED, store_id TINYINT UNSIGNED, first_name VARCHAR(45), last_name VARCHAR(45), email VARCHAR(50), address_id SMALLINT UNSIGNED, active BOOLEAN, create_date DATETIME, last_update TIMESTAMP ) CREATE TABLE address ( address_id SMALLINT UNSIGNED, address VARCHAR(50), address2 VARCHAR(50), district VARCHAR(20), city_id SMALLINT UNSIGNED, postal_code VARCHAR(10), phone VARCHAR(20), last_update TIMESTAMP ) CREATE TABLE actor ( actor_id SMALLINT UNSIGNED, first_name VARCHAR(45), last_name VARCHAR(45), last_update TIMESTAMP ) CREATE TABLE film_category ( film_id SMALLINT UNSIGNED, category_id TINYINT UNSIGNED, last_update TIMESTAMP ) CREATE TABLE payment ( payment_id SMALLINT UNSIGNED, customer_id SMALLINT UNSIGNED, staff_id TINYINT UNSIGNED, rental_id INT, amount DECIMAL(5,2), payment_date DATETIME, last_update TIMESTAMP ) CREATE TABLE film_text ( film_id SMALLINT, title VARCHAR(255), description TEXT ) CREATE TABLE rental ( rental_id INT, rental_date DATETIME, inventory_id MEDIUMINT UNSIGNED, customer_id SMALLINT UNSIGNED, return_date DATETIME, staff_id TINYINT UNSIGNED, last_update TIMESTAMP ) CREATE TABLE language ( language_id TINYINT UNSIGNED, name CHAR(20), last_update TIMESTAMP ) CREATE TABLE country ( country_id SMALLINT UNSIGNED, country VARCHAR(50), last_update TIMESTAMP ) CREATE TABLE store ( store_id TINYINT UNSIGNED, manager_staff_id TINYINT UNSIGNED, address_id SMALLINT UNSIGNED, last_update TIMESTAMP ) CREATE TABLE film_actor ( actor_id SMALLINT UNSIGNED, film_id SMALLINT UNSIGNED, last_update TIMESTAMP ) CREATE TABLE category ( category_id TINYINT UNSIGNED, name VARCHAR(25), last_update TIMESTAMP ) CREATE TABLE inventory ( inventory_id MEDIUMINT UNSIGNED, film_id SMALLINT UNSIGNED, store_id TINYINT UNSIGNED, last_update TIMESTAMP ) CREATE TABLE film ( film_id SMALLINT UNSIGNED, title VARCHAR(255), description TEXT, release_year YEAR, language_id TINYINT UNSIGNED, original_language_id TINYINT UNSIGNED, rental_duration TINYINT UNSIGNED, rental_rate DECIMAL(4,2), length SMALLINT UNSIGNED, replacement_cost DECIMAL(5,2), rating any, special_features any, last_update TIMESTAMP ) CREATE TABLE staff ( staff_id TINYINT UNSIGNED, first_name VARCHAR(45), last_name VARCHAR(45), address_id SMALLINT UNSIGNED, picture BLOB, email VARCHAR(50), store_id TINYINT UNSIGNED, active BOOLEAN, username VARCHAR(16), password VARCHAR(40), last_update TIMESTAMP ) CREATE TABLE city ( city_id SMALLINT UNSIGNED, city VARCHAR(50), country_id SMALLINT UNSIGNED, last_update TIMESTAMP )
SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' GROUP BY payment_date
Name the game for record being 3-0
CREATE TABLE table_20928661_1 ( game VARCHAR, record VARCHAR )
SELECT game FROM table_20928661_1 WHERE record = "3-0"
Name the party with end date of 22 november 1980
CREATE TABLE table_14844 ( "Minister" text, "Party" text, "Start date" text, "End date" text, "Prime Minister" text )
SELECT "Party" FROM table_14844 WHERE "End date" = '22 november 1980'
Can you tell me the highest Points that has the Played smaller than 30?
CREATE TABLE table_60855 ( "Position" real, "Club" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Points" real, "Goal Difference" real )
SELECT MAX("Points") FROM table_60855 WHERE "Played" < '30'
What engine did David Coulthard have in his mp4-13 chassis?
CREATE TABLE table_name_86 ( engine_† VARCHAR, chassis VARCHAR, driver VARCHAR )
SELECT engine_† FROM table_name_86 WHERE chassis = "mp4-13" AND driver = "david coulthard"
Which gold Coast has a Melbourne of yes, a Perth of yes, an Auckland of no, and a Sydney of no?
CREATE TABLE table_15344 ( "Sydney" text, "Melbourne" text, "Perth" text, "Adelaide" text, "Gold Coast" text, "Auckland" text )
SELECT "Gold Coast" FROM table_15344 WHERE "Melbourne" = 'yes' AND "Perth" = 'yes' AND "Auckland" = 'no' AND "Sydney" = 'no'
What is listed for the 2005 that has a 2012 of 4.2%?
CREATE TABLE table_name_35 ( Id VARCHAR )
SELECT 2005 FROM table_name_35 WHERE 2012 = "4.2%"
Which competition did not qualify for UEFA competitions in the 1970-71 season?
CREATE TABLE table_name_67 ( competition VARCHAR, lost VARCHAR, season VARCHAR )
SELECT competition FROM table_name_67 WHERE lost = "did not qualify for uefa competitions" AND season = "1970-71"
What is the rank of Point Hyllie?
CREATE TABLE table_name_52 ( rank VARCHAR, name VARCHAR )
SELECT rank FROM table_name_52 WHERE name = "point hyllie"
患者36091672号从02年2月9日到05年3月12日这段时间去过多少次医院就诊?
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE wdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM text, RYCWH text, RYDJSJ time, RYSJ time, RYTJDM number, RYTJMC text, RZBQDM text, RZBQMC text, YLJGDM number, ZYBMLX number, ZYZDBM text, ZYZDMC text, ZYZYZDZZBM text, ZYZYZDZZMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, SBBM text, SHRGH text, SHRXM text, YLJGDM text, YQBH text, YQMC 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, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JYKSBM text, JYKSMC text, JYLX number, JYRQ time, JYSQJGMC text, JYXMDM text, JYXMMC text, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SHRGH text, SHRXM text, SHSJ time, SQKS text, SQKSMC text, SQRGH text, SQRQ time, SQRXM text, YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text ) CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM text, RYCWH text, RYDJSJ time, RYSJ time, RYTJDM number, RYTJMC text, RZBQDM text, RZBQMC text, YLJGDM number, ZYBMLX number, ZYZDBM text, ZYZDMC text, ZYZYZDZZBM text, ZYZYZDZZMC text ) 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 text, NLS number, NLY number, QTJZYSGH text, SG number, SSY number, SZY number, TW number, TXBZ number, TZ number, WDBZ number, XL number, YLJGDM text, ZSEBZ number, ZZBZ number, ZZYSGH text )
SELECT (SELECT COUNT(*) 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 = '36091672' AND mzjzjlb.JZKSRQ BETWEEN '2002-02-09' AND '2005-03-12') + (SELECT COUNT(*) FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '36091672' AND wdmzjzjlb.RYDJSJ BETWEEN '2002-02-09' AND '2005-03-12' UNION SELECT COUNT(*) FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzjzjlb.KH AND hz_info.KLX = bdmzjzjlb.KLX WHERE hz_info.RYBH = '36091672' AND bdmzjzjlb.RYDJSJ BETWEEN '2002-02-09' AND '2005-03-12')
How many people went to the game that had 17-13?
CREATE TABLE table_name_39 ( attendance INTEGER, score VARCHAR )
SELECT SUM(attendance) FROM table_name_39 WHERE score = "17-13"
what are the five most common laboratory tests that patients had within 2 months after a diagnosis of s/p aortobifemoral bypass during the last year?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text )
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 = 's/p aortobifemoral bypass' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, lab.labname, lab.labresulttime FROM lab JOIN patient ON lab.patientunitstayid = patient.patientunitstayid WHERE DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.labresulttime AND DATETIME(t2.labresulttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month') GROUP BY t2.labname) AS t3 WHERE t3.c1 <= 5
total races in 2003 season
CREATE TABLE table_204_283 ( id number, "season" text, "series" text, "team" text, "races" number, "wins" number, "poles" number, "f/laps" number, "podiums" number, "points" number, "position" text )
SELECT SUM("races") FROM table_204_283 WHERE "season" = 2003
What was the opponent in the 2008 09 season, with a final score of 2 3 l?
CREATE TABLE table_7997 ( "Date" text, "Season" text, "Playing for" text, "Opponent" text, "Final score" text )
SELECT "Opponent" FROM table_7997 WHERE "Season" = '2008–09' AND "Final score" = '2–3 l'
What is the Year born (Age) for the player who is taller than 2.04 and currently plays for the Los Angeles Clippers?
CREATE TABLE table_12124 ( "Player" text, "Height" real, "Position" text, "Year born (Age)" text, "Current Club" text )
SELECT "Year born (Age)" FROM table_12124 WHERE "Height" > '2.04' AND "Current Club" = 'los angeles clippers'
Name the max irish points for eastern michigan
CREATE TABLE table_25476 ( "Date" text, "Location" text, "Opponent" text, "Irish Points" real, "Opp. Points" real, "Record" text )
SELECT MAX("Irish Points") FROM table_25476 WHERE "Opponent" = 'Eastern Michigan'