instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
How many neighborhoods have a station proposed at a Hospital? | CREATE TABLE table_22771048_4 (city_neighborhood VARCHAR,station VARCHAR) | SELECT COUNT(city_neighborhood) FROM table_22771048_4 WHERE station = "Hospital" |
What is the total number of patients who stayed at the hospital for more than 9 days and died? | 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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.days_stay > "9" |
what's the dbeingtribution with grsecurity being optional and compile time buffer checks being yes | CREATE TABLE table_1357052_6 (distribution VARCHAR,grsecurity VARCHAR,compile_time_buffer_checks VARCHAR) | SELECT distribution FROM table_1357052_6 WHERE grsecurity = "Optional" AND compile_time_buffer_checks = "Yes" |
What is the height of the Tenth Presbyterian Church? | CREATE TABLE table_name_69 (height_ft__m_ VARCHAR,name VARCHAR) | SELECT height_ft__m_ FROM table_name_69 WHERE name = "tenth presbyterian church" |
What district does incumbent james c. davis represent? | CREATE TABLE table_760 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "District" FROM table_760 WHERE "Incumbent" = 'James C. Davis' |
What is the average age for each gender? | CREATE TABLE personfriend (name text,friend text,year number)CREATE TABLE person (name text,age number,city text,gender text,job text) | SELECT AVG(age), gender FROM person GROUP BY gender |
Which horse was Horse 1 when ren guzm n raced with the mulch n association? | CREATE TABLE table_name_32 (horse_1 VARCHAR,rider_1 VARCHAR,association VARCHAR) | SELECT horse_1 FROM table_name_32 WHERE rider_1 = "rené guzmán" AND association = "mulchén" |
Find the name and capacity of the dorm with least number of amenities. | CREATE TABLE dorm_amenity (amenid number,amenity_name text)CREATE TABLE dorm (dormid number,dorm_name text,student_capacity number,gender text)CREATE TABLE has_amenity (dormid number,amenid number)CREATE TABLE lives_in (stuid number,dormid number,room_number number)CREATE TABLE student (stuid number,lname text,fname te... | SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY COUNT(*) LIMIT 1 |
Give the maximum age of patients of black/african american ethnicity who died before the year 2148. | 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 MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dod_year < "2148.0" |
what label was she working with before universal music ? | CREATE TABLE table_203_276 (id number,"album#" text,"english title" text,"chinese (traditional)" text,"chinese (simplified)" text,"release date" text,"label" text) | SELECT "label" FROM table_203_276 WHERE id = (SELECT id FROM table_203_276 WHERE "label" = 'universal music') - 1 |
had patient 006-158338's sao2 ever been greater than 94.0 degrees on the last icu visit? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweigh... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-158338') AND NOT patient.unitdischargetime IS NULL ORDER BY pati... |
What player had a finals score of 0 (10)? | CREATE TABLE table_name_5 (name VARCHAR,finals VARCHAR) | SELECT name FROM table_name_5 WHERE finals = "0 (10)" |
When the change (2010 to 2011) is +1.0% what is the change (2011 to 2012)? | CREATE TABLE table_14752049_6 (change__2011_to_2012_ VARCHAR,change__2010_to_2011_ VARCHAR) | SELECT change__2011_to_2012_ FROM table_14752049_6 WHERE change__2010_to_2011_ = "+1.0%" |
What is the number of patients admitted before 2154 who were diagnosed with removal of other organ causing abnormal patient reaction, or later complication, without mention of misadventure at time of operation? | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2154" AND diagnoses.short_title = "Abn reac-organ rem NEC" |
What is the total number of Year, when Bronze is 'Jamie Stevenson'? | CREATE TABLE table_12386 ("Year" real,"Gold" text,"Silver" text,"Bronze" text,"Notes" text) | SELECT COUNT("Year") FROM table_12386 WHERE "Bronze" = 'jamie stevenson' |
Who got high assists for the game played on February 9? | CREATE TABLE table_10812293_6 (high_assists VARCHAR,date VARCHAR) | SELECT high_assists FROM table_10812293_6 WHERE date = "February 9" |
in what playoffs the league was in the semifinals | CREATE TABLE table_1908049_1 (league VARCHAR,playoffs VARCHAR) | SELECT league FROM table_1908049_1 WHERE playoffs = "Semifinals" |
What location shows round was 1, and against Ricky Shivers? | CREATE TABLE table_47159 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text) | SELECT "Location" FROM table_47159 WHERE "Round" = '1' AND "Opponent" = 'ricky shivers' |
where college is british columbia what are all the player | CREATE TABLE table_29218 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "Player" FROM table_29218 WHERE "College" = 'British Columbia' |
Nation of bulgaria, and a Place larger than 1 had what highest 3 Balls, 2 Ribbons? | CREATE TABLE table_38204 ("Place" real,"Nation" text,"5 Hoops" real,"3 Balls,2 Ribbons" real,"Total" real) | SELECT MAX("3 Balls, 2 Ribbons") FROM table_38204 WHERE "Nation" = 'bulgaria' AND "Place" > '1' |
how many cities appear on this chart ? | CREATE TABLE table_203_731 (id number,"pos." text,"city" text,"population\n(ab)" number,"surface\n(km2)" number,"density\n(ab/km2)" number,"altitude\n(mslm)" number) | SELECT COUNT("city") FROM table_203_731 |
provide the number of patients whose death status is 1 and primary disease is newborn? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "NEWBORN" |
show me all flights from PITTSBURGH to BALTIMORE which leave thursday after 1500 o'clock pm | CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline te... | 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 ((date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... |
What is the constructor for Jackie Stewart's car? | CREATE TABLE table_51957 ("Year" text,"Driver" text,"Constructor" text,"Location" text,"Report" text) | SELECT "Constructor" FROM table_51957 WHERE "Driver" = 'jackie stewart' |
What is the web thickness if the flange width is 100? | CREATE TABLE table_2071644_2 (web_thickness__mm_ VARCHAR,flange_width__mm_ VARCHAR) | SELECT web_thickness__mm_ FROM table_2071644_2 WHERE flange_width__mm_ = 100 |
When was the last time, since December 14, 1986, that the attendance was lower than 47,096? | CREATE TABLE table_41140 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT MAX("Week") FROM table_41140 WHERE "Date" = 'december 14, 1986' AND "Attendance" < '47,096' |
Who is the winner of the Florence to Genoa course? | CREATE TABLE table_70809 ("Date" text,"Course" text,"Distance" text,"Winner" text,"Race Leader" text) | SELECT "Winner" FROM table_70809 WHERE "Course" = 'florence to genoa' |
What country was the Paris Masters tournament played in? | CREATE TABLE table_47941 ("Tournament" text,"Country" text,"Location" text,"Current Venue" text,"Began" real,"Court surface" text) | SELECT "Country" FROM table_47941 WHERE "Tournament" = 'paris masters' |
who was in the 2005 role when the original broadway cast was played by jesse l. martin? | CREATE TABLE table_28691 ("Role" text,"Original Broadway Cast" text,"2005 film" text,"2008 Final Performance Film" text,"Hollywood Bowl Cast" text,"2011 Off-Broadway Revival" text) | SELECT "2005 film" FROM table_28691 WHERE "Original Broadway Cast" = 'Jesse L. Martin' |
How many lanes have a Time of 53.61, and a Rank larger than 3? | CREATE TABLE table_66410 ("Rank" real,"Lane" real,"Name" text,"Nationality" text,"Time" real) | SELECT SUM("Lane") FROM table_66410 WHERE "Time" = '53.61' AND "Rank" > '3' |
What conferences does Noah A. Smith publish in ? | CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE paperfield (fieldid int,paperid ... | SELECT DISTINCT paper.venueid FROM author, paper, writes WHERE author.authorname = 'Noah A. Smith' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
Which position earned 50 points? | CREATE TABLE table_17256857_1 (fin_pos INTEGER,points VARCHAR) | SELECT MAX(fin_pos) FROM table_17256857_1 WHERE points = "50" |
of those football venues containing the first and last name of a person as part of the name , which is in last place for seating capacity ? | CREATE TABLE table_204_567 (id number,"team" text,"location" text,"stadium" text,"capacity" number,"manager" text,"captain" text,"kit manufacturer" text,"shirt sponsor" text) | SELECT "stadium" FROM table_204_567 ORDER BY "capacity" LIMIT 1 |
what is date of birth and diagnoses short title of subject name fernando wontor? | 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 demographic.dob, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Fernando Wontor" |
What chassis was used by roy salvadori? | CREATE TABLE table_11279 ("Entrant" text,"Constructor" text,"Chassis" text,"Engine" text,"Tyre" text,"Driver" text,"Rounds" text) | SELECT "Chassis" FROM table_11279 WHERE "Driver" = 'roy salvadori' |
what is the name of the procedure that patient 73713 has undergone two or more times in 11/2105? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title 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 numb... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 737... |
In February, which city marks the highest temperature? | CREATE TABLE city (city_id number,city text,hanzi text,hanyu_pinyin text,regional_population number,gdp number)CREATE TABLE match (match_id number,date text,venue text,score text,result text,competition text)CREATE TABLE temperature (city_id number,jan number,feb number,mar number,apr number,jun number,jul number,aug n... | SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.feb DESC LIMIT 1 |
For those employees who do not work in departments with managers that have ids between 100 and 200, for manager_id, hire_date, visualize the trend, and I want to display by the x axis from high to low. | 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 countries (COU... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC |
what was the number of tonnage for sweden ? | CREATE TABLE table_203_148 (id number,"date" text,"name" text,"nationality" text,"tonnage\n(grt)" number,"fate" text) | SELECT SUM("tonnage\n(grt)") FROM table_203_148 WHERE "nationality" = 'sweden' |
After week 2, how many people attended the game at Rich Stadium against the Miami Dolphins? | CREATE TABLE table_43459 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Record" text,"Game Site" text,"Attendance" real) | SELECT COUNT("Attendance") FROM table_43459 WHERE "Game Site" = 'rich stadium' AND "Opponent" = 'miami dolphins' AND "Week" > '2' |
since 411 days ago, when was the last time that patient 002-11679 had the minimum heartrate? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,cultu... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-11679')) AND NOT vitalperiodic.heartrate IS NUL... |
For those records from the products and each product's manufacturer, show me about the distribution of name and manufacturer , and group by attribute founder in a bar chart, and show by the bar from low to high. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name |
For those employees who was hired before 2002-06-21, find hire_date and the average of department_id bin hire_date by time, and visualize them by a bar chart, and display by the y-axis from high to low. | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID d... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID) DESC |
What the time of Paul Hession with more than an 0.187 react? | CREATE TABLE table_name_76 (time VARCHAR,react VARCHAR,athlete VARCHAR) | SELECT time FROM table_name_76 WHERE react > 0.187 AND athlete = "paul hession" |
how many were affiliated with the janata party ? | CREATE TABLE table_204_54 (id number,"pondicherry assembly" text,"duration" text,"name of m.l.a." text,"party affiliation" text,"election year" number) | SELECT COUNT(*) FROM table_204_54 WHERE "party affiliation" = 'janata party' |
Sort your highly voted comments. | CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,Rej... | SELECT C.Id AS "comment_link", C.Score AS "comment_score", P.Score AS "post_score" FROM Comments AS C INNER JOIN Posts AS P ON P.Id = C.PostId WHERE C.UserId = @user AND C.Score >= 1 ORDER BY 'comment_score' DESC LIMIT @num |
Review task - actions by one user. | CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT tt.Name, rt.Name, rt.Description, COUNT(*) FROM ReviewTaskResults AS r INNER JOIN ReviewTaskResultTypes AS rt ON r.ReviewTaskResultTypeId = rt.Id INNER JOIN ReviewTasks AS t ON r.ReviewTaskId = t.Id INNER JOIN ReviewTaskTypes AS tt ON t.ReviewTaskTypeId = tt.Id WHERE r.CreationDate BETWEEN '2016-01-01' AND '2016... |
Which Record has a Kickoff of 12:00pm cst, and a Game site of arrowhead stadium, and a Week of 15? | CREATE TABLE table_5949 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Kickoff" text,"Game site" text,"Record" text,"Match Report" text) | SELECT "Record" FROM table_5949 WHERE "Kickoff" = '12:00pm cst' AND "Game site" = 'arrowhead stadium' AND "Week" = '15' |
In what year was the movie 8 women up for a C sar Award? | CREATE TABLE table_79935 ("Year" real,"Awards" text,"Categorie" text,"Movie" text,"Result" text) | SELECT MIN("Year") FROM table_79935 WHERE "Movie" = '8 women' AND "Awards" = 'césar award' |
when was the ending time where the enemy met in the iron bowl | CREATE TABLE table_2846320_4 (last_meeting VARCHAR,name_of_rivalry VARCHAR) | SELECT last_meeting FROM table_2846320_4 WHERE name_of_rivalry = "Iron Bowl" |
the independent conference and the colonial athletic association both received how many bids ? | CREATE TABLE table_203_187 (id number,"conference" text,"bids" number,"record" text,"win %" number,"quarterfinals" number,"semifinals" number,"final" number,"champions" number) | SELECT "bids" FROM table_203_187 WHERE "conference" = 'independent' |
For all employees who have the letters D or S in their first name, give me the trend about manager_id over hire_date , display in descending by the x-axis. | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE employees (EMP... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC |
What is the highest silver medal count when there is 1 Bronze medal and 1 Gold medal? | CREATE TABLE table_53765 ("Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Silver") FROM table_53765 WHERE "Bronze" = '1' AND "Gold" = '1' |
What is the season number of the show written by both Kari Lizer and Jeff Astrof? | CREATE TABLE table_30094 ("Series #" real,"Season #" real,"Title" text,"Written by" text,"Original air date" text,"U.S. Viewers (millions)" text) | SELECT COUNT("Season #") FROM table_30094 WHERE "Written by" = 'Kari Lizer' |
Which trip started from the station with the largest dock count? Give me the trip id. | CREATE TABLE status (station_id number,bikes_available number,docks_available number,time text)CREATE TABLE weather (date text,max_temperature_f number,mean_temperature_f number,min_temperature_f number,max_dew_point_f number,mean_dew_point_f number,min_dew_point_f number,max_humidity number,mean_humidity number,min_hu... | 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 are the upper-level classes that offer 8 credits ? | CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE area (course_id int,area varchar)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 8 AND program_course.category LIKE 'ULCS' |
Find the number of distinct projects. | CREATE TABLE projects (code text,name text,hours number)CREATE TABLE scientists (ssn number,name text)CREATE TABLE assignedto (scientist number,project text) | SELECT COUNT(DISTINCT name) FROM projects |
Can you tell me the Player that has the Round smaller than 6, and the College/Junior/Club Team of hull olympiques (qmjhl)? | CREATE TABLE table_name_86 (player VARCHAR,round VARCHAR,college_junior_club_team VARCHAR) | SELECT player FROM table_name_86 WHERE round < 6 AND college_junior_club_team = "hull olympiques (qmjhl)" |
How many Seats 2005 has a Percentage in/de-crease of 50.0%, and a Governorate of dhi qar governorate, and a In/de-creased by larger than 6? | CREATE TABLE table_49642 ("Governorate" text,"Seats 2010" real,"Seats 2005" real,"In/de-creased by" real,"Percentage in/de-crease" text) | SELECT SUM("Seats 2005") FROM table_49642 WHERE "Percentage in/de-crease" = '50.0%' AND "Governorate" = 'dhi qar governorate' AND "In/de-creased by" > '6' |
Name the route number for santa rosa avenue | CREATE TABLE table_28021 ("Agency" text,"Route Number" text,"North/East Terminal" text,"South/West Terminal" text,"More Information" text) | SELECT "Route Number" FROM table_28021 WHERE "North/East Terminal" = 'Santa Rosa Avenue' |
What was Tony Oakey's Rd., Time when he fought against hastings rasani? | CREATE TABLE table_13104 ("Result" text,"Opponent" text,"Type" text,"Rd.,Time" text,"Date" text) | SELECT "Rd., Time" FROM table_13104 WHERE "Opponent" = 'hastings rasani' |
Votes and Answers by Tag. | CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE Post... | SELECT TagName, SUM(CASE WHEN VoteTypeId = 3 THEN 0 WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) AS Upvotes, SUM(CASE WHEN VoteTypeId = 3 THEN 1 WHEN VoteTypeId = 2 THEN 0 ELSE 0 END) AS Downvotes, SUM(CASE WHEN VoteTypeId = 3 THEN -1 WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) AS Score, COUNT(DISTINCT Posts.Id) AS Answers FROM T... |
Which team names have 44.5 for tumbling? | CREATE TABLE table_22014431_3 (team_name VARCHAR,tumbling VARCHAR) | SELECT team_name FROM table_22014431_3 WHERE tumbling = "44.5" |
how many patients are female? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" |
What is the score of the game with Grizzlies as the visitor team on 30 December 2007? | CREATE TABLE table_name_21 (score VARCHAR,visitor VARCHAR,date VARCHAR) | SELECT score FROM table_name_21 WHERE visitor = "grizzlies" AND date = "30 december 2007" |
What was the Name v t e, of the player whose Weight (kg) was 84, whose Position was D, and whose Jersey number was 2? | CREATE TABLE table_name_32 (name_v_t_e VARCHAR,jersey_number VARCHAR,weight__kg_ VARCHAR,position VARCHAR) | SELECT name_v_t_e FROM table_name_32 WHERE weight__kg_ = 84 AND position = "d" AND jersey_number = 2 |
What player is on the Montreal Alouettes CFl team? | CREATE TABLE table_16319 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "Player" FROM table_16319 WHERE "CFL Team" = 'Montreal Alouettes' |
what are the top four commonly taken lab tests for patients 20s? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)C... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) GROUP BY labevents.itemid) AS ... |
What was the callsign in Zamboanga? | CREATE TABLE table_529 ("Branding" text,"Callsign" text,"Frequency" text,"Power (kW)" text,"Location" text) | SELECT "Callsign" FROM table_529 WHERE "Location" = 'Zamboanga' |
What district was a republican first elected in 2000? | CREATE TABLE table_name_98 (district VARCHAR,first_elected VARCHAR,party VARCHAR) | SELECT district FROM table_name_98 WHERE first_elected = 2000 AND party = "republican" |
How many residents does each property have? List property id and resident count. Visualize by scatter chart. | CREATE TABLE Customer_Events (Customer_Event_ID INTEGER,customer_id INTEGER,date_moved_in DATETIME,property_id INTEGER,resident_id INTEGER,thing_id INTEGER)CREATE TABLE Timed_Locations_of_Things (thing_id INTEGER,Date_and_Time DATETIME,Location_Code CHAR(15))CREATE TABLE Customers (customer_id INTEGER,customer_details ... | SELECT T1.property_id, COUNT(*) FROM Properties AS T1 JOIN Residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id |
A bar chart shows the distribution of All_Home and the average of School_ID , and group by attribute All_Home, rank by the names in asc. | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce... | SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY All_Home |
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' |
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" |
give me the number of patients whose insurance is government and procedure icd9 code is 3771? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | 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" |
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" |
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 |
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' |
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" |
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%" |
what are the five most common laboratory tests that patients had within 2 months after a diagnosis of s/p aortobifemoral bypass during the last year? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE treatment (treatmentid number,patientunitstayi... | 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... |
how many times does patient 28443 since 178 months ago have flolan intake? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance tex... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'flolan' AND ... |
What is the area in CZ? | CREATE TABLE table_2395 ("District" text,"Capital City" text,"Area (km\u00b2)" real,"Area (sq.mi)" real,"Population (2005 est)" real,"2-letter abbreviation" text,"3-letter abbreviation" text) | SELECT MAX("Area (km\u00b2)") FROM table_2395 WHERE "2-letter abbreviation" = 'CZ' |
What is the biggest administrative panel with a nominated by the Taoiseach greater than 3 and an argricultural panel of 5, plust a cultural and educational panel larger than 2? | CREATE TABLE table_name_37 (administrative_panel INTEGER,cultural_and_educational_panel VARCHAR,nominated_by_the_taoiseach VARCHAR,agricultural_panel VARCHAR) | SELECT MAX(administrative_panel) FROM table_name_37 WHERE nominated_by_the_taoiseach > 3 AND agricultural_panel = 5 AND cultural_and_educational_panel > 2 |
Which people had the best 10-year period when Fischer had best 15-year period? | CREATE TABLE table_1710426_2 (best_10_year_period VARCHAR,best_15_year_period VARCHAR) | SELECT best_10_year_period FROM table_1710426_2 WHERE best_15_year_period = "Fischer" |
acute haematological malignancies | CREATE TABLE table_train_53 ("id" int,"immune_suppression" bool,"need_hemodialysis" bool,"steroid_therapy" bool,"cardiogenic_shock" bool,"hematologic_disease" bool,"coronary_syndrome" bool,"NOUSE" float) | SELECT * FROM table_train_53 WHERE hematologic_disease = 1 |
When was Catalog CHD-9192 published? | CREATE TABLE table_71998 ("Region" text,"Date" real,"Label" text,"Format" text,"Catalog" text) | SELECT "Date" FROM table_71998 WHERE "Catalog" = 'chd-9192' |
Bar chart x axis date of birth y axis height, and could you list Y in descending order? | 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 Date_of_Birth, Height FROM people ORDER BY Height DESC |
Which ReFS has yes v3.0 for NTFS? | CREATE TABLE table_32635 ("FAT16" text,"FAT32" text,"HPFS" text,"ISO 9660" text,"NTFS" text,"ReFS" text) | SELECT "ReFS" FROM table_32635 WHERE "NTFS" = 'yes v3.0' |
List total amount of invoice from Chicago, IL. | CREATE TABLE invoices (total INTEGER,billing_city VARCHAR,billing_state VARCHAR) | SELECT SUM(total) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL" |
What actor has onderweg naar morgen, as the soap opera, with aafke couwenberg as the character? | CREATE TABLE table_14026 ("Actor" text,"Character" text,"Soap Opera" text,"Years" text,"Duration" text) | SELECT "Actor" FROM table_14026 WHERE "Soap Opera" = 'onderweg naar morgen' AND "Character" = 'aafke couwenberg' |
what were the four most frequent lab tests those patients had in the same month after having had a insertion of venous catheter for hemodialysis - tunneled catheter procedure in 2104? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid num... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'insertion of venous catheter for hemodialysis - tunn... |
What shows for money ( ) when South Africa is the country? | CREATE TABLE table_59751 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money (\u00a3)" real) | SELECT MAX("Money ( \u00a3 )") FROM table_59751 WHERE "Country" = 'south africa' |
What is the lowest gold medals of a rank 12 team? | CREATE TABLE table_name_81 (gold INTEGER,rank VARCHAR) | SELECT MIN(gold) FROM table_name_81 WHERE rank = "12" |
Playing against Chelmsford City on 15 November 1986, who was the home team? | CREATE TABLE table_61468 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Home team" FROM table_61468 WHERE "Date" = '15 november 1986' AND "Away team" = 'chelmsford city' |
What are the number of the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones'?, sort Y in ascending order. | CREATE TABLE entrepreneur (Entrepreneur_ID int,People_ID int,Company text,Money_Requested real,Investor text)CREATE TABLE people (People_ID int,Name text,Height real,Weight real,Date_of_Birth text) | SELECT Date_of_Birth, COUNT(Date_of_Birth) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones" ORDER BY COUNT(Date_of_Birth) |
Who had the time 13.6? | CREATE TABLE table_13877 ("Lane" real,"Athlete" text,"Nationality" text,"Time" real,"Notes" text) | SELECT "Athlete" FROM table_13877 WHERE "Time" = '13.6' |
give me the number of patients whose death status is 0 and procedure long title is incision of vessel, aorta? | 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 lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Incision of vessel, aorta" |
Number of answered questions per day per user. | CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT DISTINCT u.Id, u.Reputation, u.DisplayName FROM Posts AS p, Users AS u WHERE p.OwnerUserId = u.Id AND p.PostTypeId = 1 GROUP BY DATE(p.CreationDate), u.Id, u.DisplayName, u.Location, u.Reputation ORDER BY u.Id |
what was the daily minimum amount of drain out #2 jp lateral given to patient 52456 in the last month? | CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE 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 ... | SELECT MIN(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52456)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'dra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.