instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
how many class with poles being bigger than 1.0
CREATE TABLE table_14139408_1 (class VARCHAR,poles INTEGER)
SELECT COUNT(class) FROM table_14139408_1 WHERE poles > 1.0
What are the high rebounds of team @ Charlotte?
CREATE TABLE table_name_17 (high_rebounds VARCHAR,team VARCHAR)
SELECT high_rebounds FROM table_name_17 WHERE team = "@ charlotte"
When was the game against the Indianapolis Colts?
CREATE TABLE table_32658 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Attendance" text)
SELECT "Date" FROM table_32658 WHERE "Opponent" = 'indianapolis colts'
price of flight from NASHVILLE to CLEVELAND
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number i...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.ci...
What is the enrollment at the school with IHSAA class A and where mascot is the Vikings?
CREATE TABLE table_name_39 (enrollment VARCHAR,ihsaa_class VARCHAR,mascot VARCHAR)
SELECT enrollment FROM table_name_39 WHERE ihsaa_class = "a" AND mascot = "vikings"
Which IHSAA class A school are the Cavaliers from?
CREATE TABLE table_name_38 (county VARCHAR,ihsaa_class VARCHAR,mascot VARCHAR)
SELECT county FROM table_name_38 WHERE ihsaa_class = "a" AND mascot = "cavaliers"
What Venue held the Olympic games in 2012?
CREATE TABLE table_name_12 (venue VARCHAR,tournament VARCHAR,year VARCHAR)
SELECT venue FROM table_name_12 WHERE tournament = "olympic games" AND year = 2012
return me the author who has the most number of papers in the VLDB conference .
CREATE TABLE conference (cid int,homepage varchar,name varchar)CREATE TABLE writes (aid int,pid int)CREATE TABLE publication (abstract varchar,cid int,citation_num int,jid int,pid int,reference_num int,title varchar,year int)CREATE TABLE author (aid int,homepage varchar,name varchar,oid int)CREATE TABLE domain_author (...
SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY author.name ORDER BY COUNT(DISTINCT (publication.title)) DESC LIMIT 1
Name the loss for record of 71-81
CREATE TABLE table_80087 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Loss" FROM table_80087 WHERE "Record" = '71-81'
Which Score has a Venue of idrottsparken?
CREATE TABLE table_44797 ("Date" text,"Venue" text,"Opponents" text,"Score" text,"Comp" text,"Attendance" text)
SELECT "Score" FROM table_44797 WHERE "Venue" = 'idrottsparken'
count the number of patients whose age is less than 83 and days of hospital stay is greater than 6?
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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "83" AND demographic.days_stay > "6"
What is the freestyle leg for the Netherlands?
CREATE TABLE table_46861 ("Country" text,"Backstroke leg" text,"Breaststroke leg" text,"Butterfly leg" text,"Freestyle leg" text)
SELECT "Freestyle leg" FROM table_46861 WHERE "Country" = 'netherlands'
What was the Attendance when the Time was 2:13?
CREATE TABLE table_79991 ("Game" real,"Date" text,"Score" text,"Location" text,"Time" text,"Attendance" real)
SELECT MIN("Attendance") FROM table_79991 WHERE "Time" = '2:13'
For all employees who have the letters D or S in their first name, give me the comparison about the sum of manager_id over the job_id , and group by attribute job_id by a bar chart.
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_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE regions (REGIO...
SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID
Return a bar chart about the distribution of All_Games and School_ID , and show in ascending by the bar.
CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En...
SELECT All_Games, School_ID FROM basketball_match ORDER BY All_Games
What was the lowest Attendance for the Staples Center Arena when the Points were over 14?
CREATE TABLE table_name_21 (attendance INTEGER,points VARCHAR,arena VARCHAR)
SELECT MIN(attendance) FROM table_name_21 WHERE points > 14 AND arena = "staples center"
how many placed in the t4 category ?
CREATE TABLE table_203_230 (id number,"place" text,"player" text,"country" text,"score" text,"to par" number)
SELECT COUNT(*) FROM table_203_230 WHERE "place" = 't4'
Wich rank is given to the Canton of Schaffhausen?
CREATE TABLE table_name_4 (rank INTEGER,canton VARCHAR)
SELECT SUM(rank) FROM table_name_4 WHERE canton = "schaffhausen"
In which tournament did Pauline Parmentier finish LQ in 2007?
CREATE TABLE table_name_34 (tournament VARCHAR)
SELECT tournament FROM table_name_34 WHERE 2007 = "lq"
Who won Womens Singles in the year that Ma Lin won Mens Singles?
CREATE TABLE table_74230 ("Year Location" text,"Mens Singles" text,"Womens Singles" text,"Mens Doubles" text,"Womens Doubles" text)
SELECT "Womens Singles" FROM table_74230 WHERE "Mens Singles" = 'Ma Lin'
which type of hospitals are the same as grossmont hospital ?
CREATE TABLE table_203_216 (id number,"rank" number,"hospital" text,"city" text,"county" text,"# beds" number,"type of hospital" text)
SELECT "type of hospital" FROM table_203_216 WHERE "hospital" = 'grossmont hospital'
How many tries did the player Paul Sykes take when he earned 0 points?
CREATE TABLE table_56579 ("Player" text,"Position" text,"Tries" real,"Goals" real,"Points" real)
SELECT MAX("Tries") FROM table_56579 WHERE "Player" = 'paul sykes' AND "Points" > '0'
Name the laid down for launched being 16 february 1934
CREATE TABLE table_66986 ("Ship" text,"Pennant number" text,"Laid down" text,"Launched" text,"Completed" text)
SELECT "Laid down" FROM table_66986 WHERE "Launched" = '16 february 1934'
Show me a bar chart for what is the project id and detail for the project with at least two documents?, and order by the y axis from high to low.
CREATE TABLE Documents_with_Expenses (Document_ID INTEGER,Budget_Type_Code CHAR(15),Document_Details VARCHAR(255))CREATE TABLE Accounts (Account_ID INTEGER,Statement_ID INTEGER,Account_Details VARCHAR(255))CREATE TABLE Projects (Project_ID INTEGER,Project_Details VARCHAR(255))CREATE TABLE Statements (Statement_ID INTEG...
SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID ORDER BY T1.Project_ID DESC
What was Tim Simpson's place?
CREATE TABLE table_name_94 (place VARCHAR,player VARCHAR)
SELECT place FROM table_name_94 WHERE player = "tim simpson"
What's the number of verbal nouns with the basic stem (root) -bil-?
CREATE TABLE table_12784134_1 (verbal_noun VARCHAR,basic_stem__root_ VARCHAR)
SELECT COUNT(verbal_noun) FROM table_12784134_1 WHERE basic_stem__root_ = "-bil-"
Find the name of customers who have more than one loan.
CREATE TABLE loan (cust_id VARCHAR)CREATE TABLE customer (cust_name VARCHAR,cust_id VARCHAR)
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1
What was the result in the election in the Kentucky 1 district?
CREATE TABLE table_28918 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text,"Candidates" text)
SELECT "Result" FROM table_28918 WHERE "District" = 'Kentucky 1'
What was the Score of the Spain F32, Gran Canaria Tournament?
CREATE TABLE table_50158 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text)
SELECT "Score" FROM table_50158 WHERE "Tournament" = 'spain f32, gran canaria'
What is the Power of the Frequency with a Callsign of DXLL?
CREATE TABLE table_name_48 (power VARCHAR,callsign VARCHAR)
SELECT power FROM table_name_48 WHERE callsign = "dxll"
how many patients whose diagnoses short title is fetal/neonatal jaund nos and lab test abnormal status is abnormal?
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 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,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Fetal/neonatal jaund NOS" AND lab.flag = "abnormal"
What was the date of vacancy after the outgoing manager, ralf santelli departed?
CREATE TABLE table_47900 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text,"Position in table" text)
SELECT "Date of vacancy" FROM table_47900 WHERE "Outgoing manager" = 'ralf santelli'
Golden tag badges by owner reputation.
CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body te...
SELECT Users.Id AS "user_link", Users.Id AS UserId, Users.Reputation, Badges.Name AS "tag_link" FROM Badges, Users WHERE Badges.Class = '1' AND Badges.TagBased = '1' AND Badges.UserId = Users.Id ORDER BY Users.Reputation, Users.Id, Badges.Name, Badges.Id
What is the Score on July 18 that has Record of 41-51?
CREATE TABLE table_36452 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Time" text,"Att." real,"Record" text)
SELECT "Score" FROM table_36452 WHERE "Date" = 'july 18' AND "Record" = '41-51'
what's the three most frequent input event since 3 years ago?
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_procedures (r...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE DATETIME(inputevents_cv.charttime) >= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY inputevents_cv.itemid) AS t1 WHERE t1.c1 <= 3)
What date was the game score w 104-98?
CREATE TABLE table_74211 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Date" FROM table_74211 WHERE "Score" = 'W 104-98'
What is the lowest Tournaments with Highest Rank of Maegashira 13?
CREATE TABLE table_name_46 (tournaments INTEGER,highest_rank VARCHAR)
SELECT MIN(tournaments) FROM table_name_46 WHERE highest_rank = "maegashira 13"
What was the name of the player for pick 402?
CREATE TABLE table_name_57 (player VARCHAR,pick VARCHAR)
SELECT player FROM table_name_57 WHERE pick = 402
during their current hospital visit what was the first id of the ward of patient 027-85328?
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 vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,he...
SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328' AND patient.hospitaldischargetime IS NULL) ORDER BY patient.unitadmittime LIMIT 1
What are the different names of the genres?
CREATE TABLE playlist_tracks (playlist_id number,track_id number)CREATE TABLE sqlite_sequence (name text,seq text)CREATE TABLE customers (id number,first_name text,last_name text,company text,address text,city text,state text,country text,postal_code text,phone text,fax text,email text,support_rep_id number)CREATE TABL...
SELECT DISTINCT name FROM genres
What was the date when the attendance was 48,041?
CREATE TABLE table_56423 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text)
SELECT "Date" FROM table_56423 WHERE "Attendance" = '48,041'
London based Angular Bronze Badge.
CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Users.Id AS "user_link", Reputation, Location FROM Users, Badges WHERE Users.Id = Badges.UserId AND Badges.Class = 3 AND Badges.TagBased = 1 AND Badges.Name = 'angularjs' AND LOWER(Users.Location) LIKE LOWER('%London%') ORDER BY Reputation DESC
Is Prof. Robert Donia teaching 452 next Winter ?
CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE program_course (program_id int,cour...
SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 452 AND instructor.name LIKE '%Robert Donia%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_in...
For all employees who have the letters D or S in their first name, show me about the change of department_id over hire_date in a line chart, rank by the X-axis in asc.
CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))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 v...
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE
Which pick number was there for Jason French?
CREATE TABLE table_43131 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text)
SELECT "Pick #" FROM table_43131 WHERE "Player" = 'jason french'
How many laps did car 23 do?
CREATE TABLE table_46184 ("Fin. Pos" text,"Car No." text,"Driver" text,"Team" text,"Laps" text,"Time/Retired" text,"Grid" text,"Laps Led" text,"Points" text)
SELECT "Laps" FROM table_46184 WHERE "Car No." = '23'
Show all calendar dates and bin by weekday in a bar chart, I want to rank y axis in desc order.
CREATE TABLE Roles (Role_Code CHAR(15),Role_Name VARCHAR(255),Role_Description VARCHAR(255))CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code CHAR(15),Document_Name CHAR(255),Document_Description CHAR(255),Other_Details VARCHAR(255))CREATE TABLE Documents_to_be_Destroyed (Document_...
SELECT Calendar_Date, COUNT(Calendar_Date) FROM Ref_Calendar ORDER BY COUNT(Calendar_Date) DESC
What is the Language when the Reteconomy is the television service?
CREATE TABLE table_name_86 (language VARCHAR,television_service VARCHAR)
SELECT language FROM table_name_86 WHERE television_service = "reteconomy"
how much weight was patient 12952's first weight on the first hospital visit?
CREATE TABLE d_labitems (row_id number,itemid number,label text)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 labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime ti...
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 = 12952 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.ite...
How many lanes have a Nationality of france, and a Rank larger than 8?
CREATE TABLE table_name_92 (lane INTEGER,nationality VARCHAR,rank VARCHAR)
SELECT SUM(lane) FROM table_name_92 WHERE nationality = "france" AND rank > 8
Specify the average age of unmarried patients admitted in or after the year 2156
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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admityear >= "2156"
Name the most previous br number
CREATE TABLE table_2079664_3 (previous_br_no INTEGER)
SELECT MAX(previous_br_no) FROM table_2079664_3
List all different genre types.
CREATE TABLE genres (id number,name text)CREATE TABLE playlists (id number,name text)CREATE TABLE employees (id number,last_name text,first_name text,title text,reports_to number,birth_date time,hire_date time,address text,city text,state text,country text,postal_code text,phone text,fax text,email text)CREATE TABLE pl...
SELECT DISTINCT name FROM genres
Name the least int yards when sacks is 11.5
CREATE TABLE table_72680 ("Player" text,"G" real,"Tackles" real,"Solo" real,"Assts" real,"Sacks" text,"Int" real,"Int yards" real,"Int avg." text,"Int TD" real,"Fum. rec" real,"Fum. rec TD" real)
SELECT MIN("Int yards") FROM table_72680 WHERE "Sacks" = '11.5'
Who is Gene Felton's TO Winning Team?
CREATE TABLE table_18905 ("Rnd" real,"Circuit" text,"GTO Winning Team" text,"GTU Winning Team" text,"TO Winning Team" text,"TU Winning Team" text,"Results" text)
SELECT "TO Winning Team" FROM table_18905 WHERE "GTO Winning Team" = 'Gene Felton'
Draw a bar chart about the distribution of meter_200 and the average of meter_100 , and group by attribute meter_200, and show by the x-axis from low to high.
CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE stadiu...
SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY meter_200
What is the lowest numbered episode in the series?
CREATE TABLE table_30156 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production" text,"U.S. viewers (in millions)" text)
SELECT MIN("No. in series") FROM table_30156
What is the average year that has a car that won 0 stages with a position of DNF?
CREATE TABLE table_71691 ("Year" real,"Class" text,"Vehicle" text,"Position" text,"Stages won" text)
SELECT AVG("Year") FROM table_71691 WHERE "Class" = 'car' AND "Stages won" = '0' AND "Position" = 'dnf'
Who did the Cubs play when they had a record of 4-4?
CREATE TABLE table_54867 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text)
SELECT "Opponent" FROM table_54867 WHERE "Record" = '4-4'
What player has a To Par of +1 with a score of 71-67-73=211?
CREATE TABLE table_name_89 (player VARCHAR,to_par VARCHAR,score VARCHAR)
SELECT player FROM table_name_89 WHERE to_par = "+1" AND score = 71 - 67 - 73 = 211
give me the number of patients whose age is less than 64 and diagnoses icd9 code is v6284?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "64" AND diagnoses.icd9_code = "V6284"
Give me the comparison about the average of School_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, order X-axis in descending order please.
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_Perce...
SELECT ACC_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC
what's the torque where performance is 0 100km/h: 7.5s auto, vmax: km/h (mph)
CREATE TABLE table_16483 ("Trim" text,"Engine" text,"Turbo" text,"Fuel Delivery" text,"Power" text,"Torque" text,"Transmission" text,"Performance" text)
SELECT "Torque" FROM table_16483 WHERE "Performance" = '0–100km/h: 7.5s auto, VMax: km/h (mph)'
On how many locations is there a church named Askrova Bedehuskapell, built in 1957?
CREATE TABLE table_21950 ("Parish (Prestegjeld)" text,"Sub-Parish (Sokn)" text,"Church Name" text,"Year Built" text,"Location of the Church" text)
SELECT COUNT("Location of the Church") FROM table_21950 WHERE "Year Built" = '1957' AND "Church Name" = 'Askrova bedehuskapell'
How low is the Attendance that has an Opponent of devil rays and a Date of may 13?
CREATE TABLE table_70651 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text)
SELECT MIN("Attendance") FROM table_70651 WHERE "Opponent" = 'devil rays' AND "Date" = 'may 13'
i would like to fly DL from ATLANTA to PITTSBURGH
CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE code_description (code varchar,description text)CREATE...
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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'AT...
Draw a bar chart about the distribution of Name and Height , and list by the Name from high to low.
CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)
SELECT Name, Height FROM people ORDER BY Name DESC
Who is the shirt sponsor for FC Bunyodkor?
CREATE TABLE table_25527255_2 (shirt_sponsor VARCHAR,team VARCHAR)
SELECT shirt_sponsor FROM table_25527255_2 WHERE team = "FC Bunyodkor"
Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. Visualize by pie chart.
CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_CODE varchar(8),EMP_NUM int,DEPT_ADDRESS varchar(20),DEPT_EXTENSION varchar(4))CREATE TABLE EMPLOYEE (EMP_NUM int,EMP_LNAME varchar(15),EMP_FNAME varchar(12),EMP_INITIAL varchar(1),EMP_JOBCODE varchar(5),EMP_HIREDATE datetime,EMP_DOB datetime)C...
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME
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 about the distribution of job_id and the sum of salary , and group by attribute job_id in a bar chart, list X in asc order.
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_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 locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL...
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID
find the diagnosis icd9 code of subject id 19420.
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (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,ethni...
SELECT diagnoses.icd9_code FROM diagnoses WHERE diagnoses.subject_id = "19420"
Which Film and Cinema Studies courses do n't have prerequisites ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE comment_instructor (instruc...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Film and Cinema Studies%' OR course.description LIKE '%Film and Cinema Studies%' OR course.name LIKE '%Film and Cinema Studies%') AND course.enforced_requirement = 'N / ...
Name the perfect stem for jo
CREATE TABLE table_12784134_24 (perfect_stem VARCHAR,short_stem VARCHAR)
SELECT COUNT(perfect_stem) FROM table_12784134_24 WHERE short_stem = "jo"
which country had the most leaders ?
CREATE TABLE table_204_126 (id number,"place" text,"player" text,"country" text,"score" text,"to par" number,"money ($)" number)
SELECT "country" FROM table_204_126 GROUP BY "country" ORDER BY COUNT("player") DESC LIMIT 1
Who are the writers for the episode 'solo'?
CREATE TABLE table_16202 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text)
SELECT "Written by" FROM table_16202 WHERE "Title" = 'Solo'
When are the birthdays of customer who are classified as 'Good Customer' status?
CREATE TABLE Customers (date_of_birth VARCHAR,customer_status_code VARCHAR)
SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'
provide the number of patients whose ethnicity is white and lab test name is protein/creatinine ratio?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Protein/Creatinine Ratio"
What is the average decile of Ruapehu college, which has a state authority?
CREATE TABLE table_68051 ("Name" text,"Years" text,"Area" text,"Authority" text,"Decile" real,"Roll" real)
SELECT AVG("Decile") FROM table_68051 WHERE "Authority" = 'state' AND "Name" = 'ruapehu college'
the release dates are no earlier than what year ?
CREATE TABLE table_203_607 (id number,"catalogue number" text,"artist" text,"release title" text,"format" text,"release date" text)
SELECT MIN("release date") FROM table_203_607
Get name, excerpts and wiki content of all tags..
CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREA...
SELECT t.TagName, e.Body AS "Excerpt", w.Body AS "WikiBody" FROM Tags AS t LEFT JOIN Posts AS e ON t.ExcerptPostId = e.Id LEFT JOIN Posts AS w ON t.WikiPostId = w.Id ORDER BY t.TagName
What's the result for the game held on December 27, 2004 with a week greater than 2?
CREATE TABLE table_32707 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Record" text,"Attendance" text)
SELECT "Result" FROM table_32707 WHERE "Week" > '2' AND "Date" = 'december 27, 2004'
Who is the player with 140,000?
CREATE TABLE table_60949 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money (\u00a3)" text)
SELECT "Player" FROM table_60949 WHERE "Money ( \u00a3 )" = '140,000'
Count the number of patients whose diagnosis icd9 code is 27801.
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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "27801"
does hydrochlorothiazide have been prescribed to patient 85700 during this month?
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_items (row_id number,itemid number,label text...
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85700) AND prescriptions.drug = 'hydrochlorothiazide' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month')
Give me a bar chart shows the distinct registration date, and bin the date into the weekday interval in a bar chart, and sort by the y axis from high to low please.
CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Voting_record (StuID INTEGER,Registration_Date VARCHAR(12),Election_Cycle VARCHAR(12),President_Vote INTEGER,Vice_President_Vote INTEGER,Secretary_Vote INTEG...
SELECT Registration_Date, COUNT(Registration_Date) FROM Voting_record ORDER BY COUNT(Registration_Date) DESC
How many places named mongmong-toto-maite?
CREATE TABLE table_2588674_1 (region VARCHAR,village VARCHAR)
SELECT COUNT(region) FROM table_2588674_1 WHERE village = "Mongmong-Toto-Maite"
self accepted answers in the given tag.
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE VoteTypes (Id number,Name...
SELECT selfAnswer.Id AS "post_link", question.Score AS QuestionScore, selfAnswer.Score AS AnswerScore, question.Tags FROM Posts AS question INNER JOIN Posts AS selfAnswer ON selfAnswer.OwnerUserId = question.OwnerUserId AND selfAnswer.ParentId = question.Id AND selfAnswer.Id = question.AcceptedAnswerId WHERE question.P...
who has a lower strike rate , anthony mcgrath or tim bresnan ?
CREATE TABLE table_203_226 (id number,"player" text,"matches" number,"innings" number,"not out" number,"runs" number,"high score" number,"average" number,"strike rate" number,"100s" number,"50s" number)
SELECT "player" FROM table_203_226 WHERE "player" IN ('anthony mcgrath', 'tim bresnan') ORDER BY "strike rate" LIMIT 1
What were the active dates for the storm that had 185km/h (115mph) deaths?
CREATE TABLE table_10602294_1 (dates_active VARCHAR,deaths VARCHAR)
SELECT dates_active FROM table_10602294_1 WHERE deaths = "185km/h (115mph)"
What is Series, when Winner is Jetmir Salaj?
CREATE TABLE table_name_54 (series VARCHAR,winner VARCHAR)
SELECT series FROM table_name_54 WHERE winner = "jetmir salaj"
Who is the voice actor (harmony gold ova dub) of the character with a voice actor (adv TV/sentai ova dub) Kim Prause?
CREATE TABLE table_name_10 (voice_actor__harmony_gold_ova_dub_ VARCHAR,voice_actor__adv_tv_sentai_ova_dub_ VARCHAR)
SELECT voice_actor__harmony_gold_ova_dub_ FROM table_name_10 WHERE voice_actor__adv_tv_sentai_ova_dub_ = "kim prause"
What was the score of the home team when the away team was Geelong?
CREATE TABLE table_name_59 (home_team VARCHAR,away_team VARCHAR)
SELECT home_team AS score FROM table_name_59 WHERE away_team = "geelong"
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the average of employee_id , and group by attribute job_id, sort in ascending by the y axis please.
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 regions (REGION_ID decimal(5,0),REGIO...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID)
What is the id of the trip that started from the station with the highest dock count?
CREATE TABLE station (id number,name text,lat number,long number,dock_count number,city text,installation_date text)CREATE TABLE trip (id number,duration number,start_date text,start_station_name text,start_station_id number,end_date text,end_station_name text,end_station_id number,bike_id number,subscription_type text...
SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1
What classes will Dr. Yang Zhang be teaching this upcoming semester ?
CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE student (student_id int,lastname va...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Yang Zhang%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offeri...
what is the maximum total hospital cost involving a procedure called a neurosurgery - resection of avm?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch...
SELECT MAX(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 treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'neurosurgery - resection of avm')) GROUP BY ...
how many representatives are republican ?
CREATE TABLE table_204_887 (id number,"district" number,"representative" text,"party" text,"residence" text,"counties represented" text)
SELECT COUNT("representative") FROM table_204_887 WHERE "party" = 'republican'
Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7?
CREATE TABLE table_name_36 (played INTEGER,points VARCHAR,lost VARCHAR)
SELECT MAX(played) FROM table_name_36 WHERE points > 11 AND lost > 7
count the number of patients on iv bolus route of drug administration who have procedure icd9 code 4601.
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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4601" AND prescriptions.route = "IV BOLUS"
Name the most rank for wins outdoor larger than 1 and wins indoor less than 0
CREATE TABLE table_name_87 (rank INTEGER,wins__outdoor_ VARCHAR,wins__indoor_ VARCHAR)
SELECT MAX(rank) FROM table_name_87 WHERE wins__outdoor_ > 1 AND wins__indoor_ < 0