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_Per... | 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 ... | 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 numb... | 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 numb... | 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)... | 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 numb... | 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... | 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
)
C... | 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),
CO... | 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... | 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 (
... | 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 SMALL... | 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... | 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... |
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
)... | 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.di... |
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' |