instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
How many american indian and alaska natives were diagnosed with other pulmonary insufficiency and were not elsewhere classified? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND diagnoses.long_title = "Other pulmonary insufficiency, not elsewhere classified" |
Which state had 3821 students in the fall of 06? | CREATE TABLE table_15055594_6 (states VARCHAR,fall_06 VARCHAR) | SELECT states FROM table_15055594_6 WHERE fall_06 = 3821 |
What dates was the falken tasmania challenge race that had triple eight race engineering as the team? | CREATE TABLE table_20884163_2 (date VARCHAR,team VARCHAR,race_title VARCHAR) | SELECT date FROM table_20884163_2 WHERE team = "Triple Eight Race Engineering" AND race_title = "Falken Tasmania Challenge" |
with delivery date of 2001 2001 what is gross tonnage? | CREATE TABLE table_name_35 (gross_tonnage INTEGER,delivery_date VARCHAR) | SELECT AVG(gross_tonnage) FROM table_name_35 WHERE delivery_date = "2001 2001" |
What score in the final has hard as the surface, and june 13, 2011 as the date? | CREATE TABLE table_name_57 (score_in_the_final VARCHAR,surface VARCHAR,date VARCHAR) | SELECT score_in_the_final FROM table_name_57 WHERE surface = "hard" AND date = "june 13, 2011" |
For those employees who did not have any job in the past, return a line chart about the change of manager_id over hire_date . | 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... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
what prescription drug was first prescribed to patient 013-11660 in 12/this year? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labna... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-11660')) AND DATETIME(medication.drugstarttime, 'start of year'... |
Show all company names with a movie directed in year 1999. | CREATE TABLE culture_company (company_name VARCHAR,movie_id VARCHAR)CREATE TABLE movie (movie_id VARCHAR,year VARCHAR) | SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999 |
For those employees who did not have any job in the past, a bar chart shows the distribution of job_id and the amount of job_id , and group by attribute job_id, and list how many job id from low to high order. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))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),MANAGE... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) |
Which Unit test has a MSDN integration of full, and a Projects templates of yes? | CREATE TABLE table_38389 ("Product" text,"Extensions" text,"Projects templates" text,"MSDN integration" text,"Debugging" text,"Profiling" text,"IntelliTrace" text,"Unit test" text,"Code coverage" text,"Test impact analysis" text,"Load testing" text,"Lab management" text,"Architecture and modelling" text,"Windows Phone ... | SELECT "Unit test" FROM table_38389 WHERE "MSDN integration" = 'full' AND "Projects templates" = 'yes' |
please show me the PHILADELPHIA to DENVER SATURDAY flights again | CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE time_zone (time_zo... | 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND days.day_name = 'SATURDAY' AND flight.flight_days = days.days_code AND ... |
how many innings did bill and ted have in total ? | CREATE TABLE table_204_154 (id number,"player" text,"matches" number,"innings" number,"runs" number,"average" number,"100s" number,"50s" number) | SELECT SUM("innings") FROM table_204_154 WHERE "player" IN ('bill roe', 'ted tyler') |
Find meter_300 and meter_100 , and visualize them by a bar chart, and rank by the bars in descending please. | CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)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 stadium (ID int,name text,Capacity int,City text,Country text,Opening_year... | SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_300 DESC |
provide me with the top three diagnoses that had the highest three year mortality rate. | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,... | SELECT t4.diagnosisname FROM (SELECT t3.diagnosisname, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.diagnosisname, 100 - SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 10... |
Will 282 be offered next term ? | CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE ta (campus_job_id int,student_id ... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 282 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
When 17 is the tries for what is the points against? | CREATE TABLE table_22018 ("Club" text,"Played" text,"Won" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text) | SELECT "Points against" FROM table_22018 WHERE "Tries for" = '17' |
Are there any courses I must have previously taken to enroll in PERIODON 796 ? | CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... |
What is Country, when Player is 'Hale Irwin'? | CREATE TABLE table_name_96 (country VARCHAR,player VARCHAR) | SELECT country FROM table_name_96 WHERE player = "hale irwin" |
what were the three most commonly ordered specimen tests in 2100? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,chartti... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE STRFTIME('%y', microbiologyevents.charttime) = '2100' GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 3 |
Which Lead has a Skip of mike mcewen? | CREATE TABLE table_49156 ("Skip" text,"Third/Vice skip" text,"Second" text,"Lead" text,"City" text) | SELECT "Lead" FROM table_49156 WHERE "Skip" = 'mike mcewen' |
provide the number of patients whose lab test chart time is 2120-04-16 13:27:00? | 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_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.charttime = "2120-04-16 13:27:00" |
tell me the first test that patient 010-9756 had received this month? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-9756')) AND DATETIME(lab.labresulttime, 'start of month') = DATETIME(CURRENT_TIME(), ... |
what's the country with health being 91.4 | CREATE TABLE table_72569 ("Rank" real,"Country" text,"Overall" text,"Justice" text,"Health" text,"Education" text,"Economics" text,"Politics" text) | SELECT "Country" FROM table_72569 WHERE "Health" = '91.4' |
What is the total year of the winner who plays the halfback position with a % of points possible of 80.64%? | CREATE TABLE table_42496 ("Year" real,"Winner" text,"School" text,"Position" text,"Points" text,"% of Points Possible" text) | SELECT COUNT("Year") FROM table_42496 WHERE "Position" = 'halfback' AND "% of Points Possible" = '80.64%' |
how many asian patients had a base drug type? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "ASIAN" AND prescriptions.drug_type = "BASE" |
when patient 8773 arterial bp [diastolic] last measured on 12/19/2104? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE inputevents_cv (row_... | SELECT chartevents.charttime 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 = 8773)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... |
What is the Rank of the Athlete with a Time of 1:47.65 and in Lane 3 or larger? | CREATE TABLE table_name_35 (rank INTEGER,time VARCHAR,lane VARCHAR) | SELECT MAX(rank) FROM table_name_35 WHERE time = "1:47.65" AND lane > 3 |
Show all director names who have a movie in both year 1999 and 2000. | CREATE TABLE culture_company (company_name text,type text,incorporated_in text,group_equity_shareholding number,book_club_id text,movie_id text)CREATE TABLE movie (movie_id number,title text,year number,director text,budget_million number,gross_worldwide number)CREATE TABLE book_club (book_club_id number,year number,au... | SELECT director FROM movie WHERE year = 2000 INTERSECT SELECT director FROM movie WHERE year = 1999 |
When rangitikei is the electorate who is the winner? | CREATE TABLE table_28898948_3 (winner VARCHAR,electorate VARCHAR) | SELECT winner FROM table_28898948_3 WHERE electorate = "Rangitikei" |
What party was Tony P. Hall affiliated with? | CREATE TABLE table_1341586_36 (party VARCHAR,incumbent VARCHAR) | SELECT party FROM table_1341586_36 WHERE incumbent = "Tony P. Hall" |
How many films were in assamese? | CREATE TABLE table_28198 ("Name of Award" text,"Name of Film" text,"Language" text,"Awardee(s)" text,"Cash Prize" text) | SELECT COUNT("Name of Film") FROM table_28198 WHERE "Language" = 'Assamese' |
Which Club team has a Pick larger than 139? | CREATE TABLE table_name_55 (club_team VARCHAR,pick INTEGER) | SELECT club_team FROM table_name_55 WHERE pick > 139 |
How big is the province with the Armenian name of ? | CREATE TABLE table_23887174_1 (area__km²_ INTEGER,armenian_name VARCHAR) | SELECT MIN(area__km²_) FROM table_23887174_1 WHERE armenian_name = "Փայտակարան" |
What is the length for iin range 51-55? | CREATE TABLE table_15905399_1 (length VARCHAR,iin_ranges VARCHAR) | SELECT length FROM table_15905399_1 WHERE iin_ranges = "51-55" |
count the number of patients whose insurance is private and procedure long title is percutaneous [endoscopic] gastrostomy [peg]? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid 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 text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Percutaneous [endoscopic] gastrostomy [PEG]" |
What is every entry for Friday August 26 when the entry for Wednesday August 24 is 23' 52.67 94.807mph? | CREATE TABLE table_31475 ("Rank" real,"Rider" text,"Sat 20 Aug" text,"Mon 22 Aug" text,"Tues 23 Aug" text,"Wed 24 Aug" text,"Thurs 25 Aug" text,"Fri 26 Aug" text,"Sat 27 Aug" text,"Mon 29 Aug" text,"Wed 31 Aug" text) | SELECT "Fri 26 Aug" FROM table_31475 WHERE "Wed 24 Aug" = '23'' 52.67 94.807mph' |
Can you tell me the Attendance that has the Opponent of new york giants? | CREATE TABLE table_49342 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT "Attendance" FROM table_49342 WHERE "Opponent" = 'new york giants' |
How many position does Jim Farmer play in? | CREATE TABLE table_11545282_6 (position VARCHAR,player VARCHAR) | SELECT COUNT(position) FROM table_11545282_6 WHERE player = "Jim Farmer" |
What is the largest number of points for Orion with more than 4 losses? | CREATE TABLE table_name_53 (points__pts_ INTEGER,team__equipo_ VARCHAR,lost__pp_ VARCHAR) | SELECT MAX(points__pts_) FROM table_name_53 WHERE team__equipo_ = "orion" AND lost__pp_ > 4 |
What is the total amount of world records for Roger Francois? | CREATE TABLE table_name_54 (roger_françois VARCHAR,world_record VARCHAR) | SELECT roger_françois FROM table_name_54 WHERE world_record = "total" |
What is the end when moving from is listed as cary clarets? | CREATE TABLE table_1733 ("N" real,"P" text,"Name" text,"EU" text,"Country" text,"Age" real,"Type" text,"Moving from" text,"Transfer window" text,"Ends" text,"Transfer fee" text,"Source" text) | SELECT "Ends" FROM table_1733 WHERE "Moving from" = 'Cary Clarets' |
number of questions on stackoverflow. | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,Cl... | SELECT COUNT(*) AS count FROM Posts WHERE PostTypeId = 1 |
What character did Katie Rowley Jones play in the Original West End Cast? | CREATE TABLE table_name_22 (character VARCHAR,original_west_end_cast VARCHAR) | SELECT character FROM table_name_22 WHERE original_west_end_cast = "katie rowley jones" |
What team had less than 159 laps and a time or retired time of 4:00:30.7537 (retired - fire)? | CREATE TABLE table_name_14 (name VARCHAR,laps VARCHAR,time_retired VARCHAR) | SELECT name FROM table_name_14 WHERE laps < 159 AND time_retired = "4:00:30.7537 (retired - fire)" |
Which shield winner has the mls cup runner up and the season is 2000? | CREATE TABLE table_11148572_1 (mls_cup_runner_up VARCHAR,season VARCHAR) | SELECT mls_cup_runner_up FROM table_11148572_1 WHERE season = 2000 |
What was the smallest attendance at a game when the record was 7-15? | CREATE TABLE table_name_7 (attendance INTEGER,record VARCHAR) | SELECT MIN(attendance) FROM table_name_7 WHERE record = "7-15" |
What is the minimum area id the 2011 population is 3067549? | CREATE TABLE table_2168295_1 (area__km²_ INTEGER,population__2011_ VARCHAR) | SELECT MIN(area__km²_) FROM table_2168295_1 WHERE population__2011_ = 3067549 |
What was the PI GP fpr pick# 235 for Rd# larger than 12? | CREATE TABLE table_57505 ("Rd #" real,"Pick #" real,"Player" text,"Team (League)" text,"Reg GP" real,"Pl GP" real) | SELECT MIN("Pl GP") FROM table_57505 WHERE "Pick #" = '235' AND "Rd #" > '12' |
Plot year by mean price as a line chart | CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT)CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT) | SELECT Year, AVG(Price) FROM wine GROUP BY Year |
How many teams did inge 6 have the high assists with? | CREATE TABLE table_30054758_3 (team VARCHAR,high_assists VARCHAR) | SELECT COUNT(team) FROM table_30054758_3 WHERE high_assists = "Inge – 6" |
What's the nationality of Henry Carr having a time of 20.3y? | CREATE TABLE table_name_82 (nationality VARCHAR,athlete VARCHAR,time VARCHAR) | SELECT nationality FROM table_name_82 WHERE athlete = "henry carr" AND time = "20.3y" |
how many of the patients admitted to emergency had a lab test for rbc and csf? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "RBC, CSF" |
which attendance has a Loss of drese (0-2)? | CREATE TABLE table_name_24 (attendance VARCHAR,loss VARCHAR) | SELECT attendance FROM table_name_24 WHERE loss = "drese (0-2)" |
Who danced the Cha-Cha-Cha on November 18, 2008? | CREATE TABLE table_name_2 (pair VARCHAR,dance VARCHAR,date VARCHAR) | SELECT pair FROM table_name_2 WHERE dance = "cha-cha-cha" AND date = "november 18, 2008" |
When the result is retired to run for U.S. Senate Democratic Hold, who is the candidate? | CREATE TABLE table_18561 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Candidates" FROM table_18561 WHERE "Result" = 'Retired to run for U.S. Senate Democratic hold' |
Give the advisor with the most students. | CREATE TABLE allergy_type (allergy text,allergytype text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE has_allergy (stuid number,allergy text) | SELECT advisor FROM student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1 |
What is the easiest class I can take to get the ULCS requirement met ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course_prerequisite (... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... |
What was the week number when the opponent was the New York Jets? | CREATE TABLE table_72948 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Record" text,"Attendance" real) | SELECT MAX("Week") FROM table_72948 WHERE "Opponent" = 'New York Jets' |
When Yusuke Hatanaka was the stage winner in the tonton susanto general classification, what was the malaysian rider classification? | CREATE TABLE table_38699 ("Stage" text,"Stage winner" text,"General classification" text,"Points classification" text,"Mountains classification" text,"Malaysian rider classification" text,"Team classification" text) | SELECT "Malaysian rider classification" FROM table_38699 WHERE "General classification" = 'tonton susanto' AND "Stage winner" = 'yusuke hatanaka' |
What is the average student GPA for every department? Return a bar chart, I want to display by the X-axis in ascending. | 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 STUDENT (STU_NUM int,STU_LNAME varchar(15),STU_FNAME varchar(15),STU_INIT varchar(1),STU_DOB datetime,STU_HRS int,STU_CLASS varchar(2),STU_GPA float(8),STU_TRANS... | SELECT DEPT_CODE, AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_CODE |
Draw a bar chart for what is the average rating star for each reviewer?, and I want to order from low to high by the X. | CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)CREATE TABLE Reviewer (rID int,name text) | SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY name |
Simple Search Comments + sort on display name. based on work by [@rene on Meta](http://meta.stackexchange.com/a/234278/203418) | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId numb... | SELECT DISTINCT c.Id AS "comment_link", c.PostId AS "post_link", u.Id AS "user_link", u.DisplayName FROM Comments AS c INNER JOIN Users AS u ON u.Id = c.UserId WHERE c.Text LIKE '%##SearchValue##%' ORDER BY u.DisplayName |
what are the latest flights that i can take from BALTIMORE to BOSTON | CREATE TABLE code_description (code varchar,description text)CREATE TABLE airline (airline_code varchar,airline_name text,note text)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 ... | 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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOS... |
the quartier menpenti has how many 40-59 year olds? | CREATE TABLE table_4225 ("Quartier" text,"% 0-19 years" text,"% 20-39 years" text,"% 40-59 years" text,"% 60-74 years" text,"% 75 years and +" text) | SELECT "% 40-59 years" FROM table_4225 WHERE "Quartier" = 'Menpenti' |
How many shader models have a 900 core clock ( mhz )? | CREATE TABLE table_25839957_5 (shader_model VARCHAR,core_clock___mhz__ VARCHAR) | SELECT COUNT(shader_model) FROM table_25839957_5 WHERE core_clock___mhz__ = "900" |
What's the Score that's got a listing of December that larger than 8 and Record of 25-8-3? | CREATE TABLE table_5151 ("Game" real,"December" real,"Opponent" text,"Score" text,"Record" text) | SELECT "Score" FROM table_5151 WHERE "December" > '8' AND "Record" = '25-8-3' |
Questions per month, Config Mgmt Frameworks. How do Scala web frameworks compare to each other?
I'm restricting the questions to those tagged Scala, to avoid polluting Playframework's result. It might be unfair, but I can't think of any other way to do it. At least all frameworks are being equally discriminated agains... | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUser... | SELECT *, COUNT(*) FROM (SELECT DATE(CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) + '-01') AS Month, t.TagName FROM (SELECT p.Id, p.CreationDate FROM Posts AS p JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId) AS pp JOIN PostTags AS pt ON ... |
Tell me the highest week for metropolitan stadium for attendance more than 47,644 | CREATE TABLE table_31972 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Venue" text,"Attendance" real) | SELECT MAX("Week") FROM table_31972 WHERE "Venue" = 'metropolitan stadium' AND "Attendance" > '47,644' |
who was the top prize winner in cha $ e ? | CREATE TABLE table_203_446 (id number,"name" text,"gender" text,"age" number,"from" text,"occupation" text,"prize money (usd)" text,"status" text) | SELECT "name" FROM table_203_446 ORDER BY "prize money (usd)" DESC LIMIT 1 |
Visualize a pie chart about the proportion of All_Road and All_Games_Percent. | 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 All_Road, All_Games_Percent FROM basketball_match |
Which Track has a Writer(s) of mac davis? | CREATE TABLE table_name_48 (track INTEGER,writer_s_ VARCHAR) | SELECT AVG(track) FROM table_name_48 WHERE writer_s_ = "mac davis" |
A bar chart for listing the number of the name of technicians whose team is not 'NYY'. | CREATE TABLE repair_assignment (technician_id int,repair_ID int,Machine_ID int)CREATE TABLE technician (technician_id real,Name text,Team text,Starting_Year real,Age int)CREATE TABLE machine (Machine_ID int,Making_Year int,Class text,Team text,Machine_series text,value_points real,quality_rank int)CREATE TABLE repair (... | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name |
What are the most poles listed? | CREATE TABLE table_25548630_1 (poles INTEGER) | SELECT MAX(poles) FROM table_25548630_1 |
List the name of the county with the largest population. | CREATE TABLE city (city_id number,county_id number,name text,white number,black number,amerindian number,asian number,multiracial number,hispanic number)CREATE TABLE county_public_safety (county_id number,name text,population number,police_officers number,residents_per_officer number,case_burden number,crime_rate numbe... | SELECT name FROM county_public_safety ORDER BY population DESC LIMIT 1 |
how many days has it passed since patient 55360 was admitted to the icu. | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)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_... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55360) AND icustays.outtime IS NULL |
What is the method when the time is 5:00, and the record is 14 6 1? | CREATE TABLE table_name_3 (method VARCHAR,time VARCHAR,record VARCHAR) | SELECT method FROM table_name_3 WHERE time = "5:00" AND record = "14–6–1" |
Find the number of records of each policy type and its type code Visualize by bar chart, and could you rank bar in ascending order? | CREATE TABLE Staff (Staff_ID INTEGER,Staff_Details VARCHAR(255))CREATE TABLE Claims_Processing_Stages (Claim_Stage_ID INTEGER,Next_Claim_Stage_ID INTEGER,Claim_Status_Name VARCHAR(255),Claim_Status_Description VARCHAR(255))CREATE TABLE Claims_Processing (Claim_Processing_ID INTEGER,Claim_ID INTEGER,Claim_Outcome_Code C... | SELECT Policy_Type_Code, COUNT(*) FROM Policies GROUP BY Policy_Type_Code ORDER BY Policy_Type_Code |
When the country is Cambodia and the total is smaller than 1 what's the lowest silver? | CREATE TABLE table_6346 ("Country" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MIN("Silver") FROM table_6346 WHERE "Country" = 'cambodia' AND "Total" < '1' |
just show me the top three most common diagnosis since 1 year ago? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,discha... | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 3 |
What is the average pick after Round 2? | CREATE TABLE table_53487 ("Draft" text,"Round" real,"Pick" real,"Nationality" text,"Position" text,"School/Club Team" text) | SELECT AVG("Pick") FROM table_53487 WHERE "Round" > '2' |
How many games have Air Force as the opponent? | CREATE TABLE table_21091162_1 (game INTEGER,opponent VARCHAR) | SELECT MAX(game) FROM table_21091162_1 WHERE opponent = "Air Force" |
What number picked were players from arizona state picked? | CREATE TABLE table_14650373_1 (pick__number VARCHAR,college VARCHAR) | SELECT pick__number FROM table_14650373_1 WHERE college = "Arizona State" |
What is the goal difference for entries with more than 6 draws, a position lower than 12, and fewer than 9 wins? | CREATE TABLE table_name_97 (goal_difference VARCHAR,wins VARCHAR,draws VARCHAR,position VARCHAR) | SELECT goal_difference FROM table_name_97 WHERE draws > 6 AND position > 12 AND wins < 9 |
What is Country, when Score is '73-68=141'? | CREATE TABLE table_9815 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Country" FROM table_9815 WHERE "Score" = '73-68=141' |
Which school year was the Class AAA dalhart and the class AAAAA edinburg? | CREATE TABLE table_name_73 (school_year VARCHAR,class_aAA VARCHAR,dalhart VARCHAR,class_aAAAA VARCHAR,edinburg VARCHAR) | SELECT school_year FROM table_name_73 WHERE class_aAA = dalhart AND class_aAAAA = edinburg |
for the position of rb what is the name? | CREATE TABLE table_name_67 (name VARCHAR,position VARCHAR) | SELECT name FROM table_name_67 WHERE position = "rb" |
I want to see trend the number of season over season by Away_team | CREATE TABLE injury_accident (game_id int,id int,Player text,Injury text,Number_of_matches text,Source text)CREATE TABLE stadium (id int,name text,Home_Games int,Average_Attendance real,Total_Attendance real,Capacity_Percentage real)CREATE TABLE game (stadium_id int,id int,Season int,Date text,Home_team text,Away_team ... | SELECT Season, COUNT(Season) FROM game GROUP BY Away_team |
What is the number of ends lost when there are 15 blank ends, less than 14 stolen ends? | CREATE TABLE table_42821 ("Locale" text,"Skip" text,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot Pct." real) | SELECT COUNT("Ends Lost") FROM table_42821 WHERE "Blank Ends" = '15' AND "Stolen Ends" < '14' |
What episode was written by Bobby Bell and Bill Lee? | CREATE TABLE table_12226390_4 (no_in_season INTEGER,written_by VARCHAR) | SELECT MAX(no_in_season) FROM table_12226390_4 WHERE written_by = "Bobby Bell and Bill Lee" |
what are the flights from PHILADELPHIA to DALLAS on 10 1 1991 | CREATE TABLE compartment_class (compartment varchar,class_type varchar)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 city (city_code varchar,city_name varchar,state_code va... | 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND date_day.day_number = 1 AND date_day.month_number = 10 AND da... |
Which locations did Gordon Johncock hold the pole position? | CREATE TABLE table_25235 ("Rnd" real,"Date" text,"Race Name" text,"Length" text,"Track" text,"Location" text,"Pole Position" text,"Winning Driver" text) | SELECT "Location" FROM table_25235 WHERE "Pole Position" = 'Gordon Johncock' |
what is admission time and diagnoses long title of subject name roxanna weaver? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT demographic.admittime, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Roxanna Weaver" |
What's the number of the episode directed by Whitney Ransick? | CREATE TABLE table_2345558_1 (_number VARCHAR,director VARCHAR) | SELECT _number FROM table_2345558_1 WHERE director = "Whitney Ransick" |
Name the surface against monaco | CREATE TABLE table_22853654_9 (surface VARCHAR,against VARCHAR) | SELECT surface FROM table_22853654_9 WHERE against = "Monaco" |
does patient 31325 have an organism found in his first bone marrow test in their first hospital visit? | 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE chartevents (... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31325 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND microbiologyevents.spec_type_desc = 'bone marrow' AND NOT microbiologyevents.org_... |
What's the BTU/Gal of the fuel whose kWh/Gal is 24.04? | CREATE TABLE table_2224692_1 (btu_gal VARCHAR,kwh_gal VARCHAR) | SELECT btu_gal FROM table_2224692_1 WHERE kwh_gal = "24.04" |
How many points did Antwain Barbour score in the year he played 39 games? | CREATE TABLE table_name_12 (points INTEGER,name VARCHAR,games VARCHAR) | SELECT SUM(points) FROM table_name_12 WHERE name = "antwain barbour" AND games < 39 |
When koki mizuno is the player what is the lowest league cup? | CREATE TABLE table_1836 ("P" real,"Player" text,"Position" text,"SPL" real,"League Cup" real,"Scottish Cup" real,"UEFA Champions League" real,"Total" real) | SELECT MIN("League Cup") FROM table_1836 WHERE "Player" = 'Koki Mizuno' |
How many weeks were there games with 41,384 fans in attendance? | CREATE TABLE table_48794 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text) | SELECT SUM("Week") FROM table_48794 WHERE "Attendance" = '41,384' |
What is the type for the population in 2011 of 1004? | CREATE TABLE table_27874 ("Settlement" text,"Cyrillic Name Other Names" text,"Type" text,"Population (2011)" real,"Largest ethnic group (2002)" text,"Dominant religion (2002)" text) | SELECT "Type" FROM table_27874 WHERE "Population (2011)" = '1004' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.