instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Which round was Mike Peca (C) of Canada selected in? | CREATE TABLE table_54110 ("Round" real,"Player" text,"Nationality" text,"NHL team" text,"College/junior/club team (league)" text) | SELECT SUM("Round") FROM table_54110 WHERE "Nationality" = 'canada' AND "Player" = 'mike peca (c)' |
How many appearances by Meek Mill? | CREATE TABLE table_29160596_1 (appearances INTEGER,top_mc VARCHAR) | SELECT MAX(appearances) FROM table_29160596_1 WHERE top_mc = "Meek Mill" |
what was the last care unit of patient 27362 since 2104? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE cha... | SELECT transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27362) AND NOT transfers.careunit IS NULL AND STRFTIME('%y', transfers.intime) >= '2104' ORDER BY transfers.intime DESC LIMIT 1 |
How manu aircraft landings when the cargo tonnes are 18 344? | CREATE TABLE table_62556 ("Year" real,"Total passengers" text,"Passenger Change" text,"Domestic" text,"International (total)" text,"International (non-CIS)" text,"Aircraft Landings" text,"Cargo (tonnes)" text) | SELECT "Aircraft Landings" FROM table_62556 WHERE "Cargo (tonnes)" = '18 344' |
what is the resale when the down (up to kbit/s) is 24000? | CREATE TABLE table_name_41 (resale VARCHAR,down__up_to_kbit_s_ VARCHAR) | SELECT resale FROM table_name_41 WHERE down__up_to_kbit_s_ = 24000 |
What was the method for opponent of Ivan Serati? | CREATE TABLE table_74826 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Method" FROM table_74826 WHERE "Opponent" = 'ivan serati' |
Count Questions with accepted answer by tag name. | CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Tags (Id number,TagName... | SELECT COUNT(question.Id) FROM Posts AS question INNER JOIN Posts AS answer ON question.Id = answer.ParentId AND question.AcceptedAnswerId = answer.Id AND question.Tags LIKE '%##TagName1##%' |
What team did the suns play on April 21? | CREATE TABLE table_29997127_4 (team VARCHAR,date VARCHAR) | SELECT team FROM table_29997127_4 WHERE date = "April 21" |
Which is the most popular voting method for Hall of Fame in 2000? | CREATE TABLE player_award (player_id text,award_id text,year number,league_id text,tie text,notes text)CREATE TABLE player (player_id text,birth_year text,birth_month text,birth_day text,birth_country text,birth_state text,birth_city text,death_year text,death_month text,death_day text,death_country text,death_state te... | SELECT votedby FROM hall_of_fame WHERE yearid = "2000" GROUP BY votedby ORDER BY COUNT(*) DESC LIMIT 1 |
For those employees who did not have any job in the past, give me the trend about salary over hire_date , could you sort x-axis from low to high order? | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,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)... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE |
Which country has the Highest mountain of rettlkirchspitze? | CREATE TABLE table_52140 ("AVE- No." text,"Name" text,"Country" text,"Highest mountain" text,"Height (m)" real) | SELECT "Country" FROM table_52140 WHERE "Highest mountain" = 'rettlkirchspitze' |
What was Footscray's score as an away team? | CREATE TABLE table_33257 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_33257 WHERE "Away team" = 'footscray' |
For each city, return the highest latitude among its stations Show bar chart, and could you show X-axis in ascending order? | CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f INTEGER,max_dew_point_f INTEGER,mean_dew_point_f INTEGER,min_dew_point_f INTEGER,max_humidity INTEGER,mean_humidity INTEGER,min_humidity INTEGER,max_sea_level_pressure_inches NUMERIC,mean_sea_level_pressure_inches NUM... | SELECT city, MAX(lat) FROM station GROUP BY city ORDER BY city |
What's the first elected year of the district who's been the last one to do so? | CREATE TABLE table_1341472_12 (first_elected INTEGER) | SELECT MAX(first_elected) FROM table_1341472_12 |
What time was there when the bike was Ducati 999 F06 and the grid number was 15? | CREATE TABLE table_11595 ("Rider" text,"Bike" text,"Laps" real,"Time" text,"Grid" real) | SELECT "Time" FROM table_11595 WHERE "Bike" = 'ducati 999 f06' AND "Grid" = '15' |
what is the number of patients whose ethnicity is american indian/alaska native and age is less than 81? | 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 demographic (subject_id text,hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.age < "81" |
what was the only yacht owned by clapp ? | CREATE TABLE table_204_781 (id number,"name(s)" text,"yard no." number,"type (as built)" text,"owner" text,"imo number" number,"laid down" text,"launched" text,"delivered/\ncommissioned" text,"fate/\ndecommissioned" text,"notes" text) | SELECT "name(s)" FROM table_204_781 WHERE "owner" = 'clapp' |
What is the smallest population recorded back in 2002? | CREATE TABLE table_878 ("Commune" text,"Area (km 2)" text,"2002 population" real,"Density (km 2)" text,"Government website" text) | SELECT MIN("2002 population") FROM table_878 |
when did patient 030-37878 get during their last hospital encounter a lab test for the last time? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,l... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-37878' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitala... |
Of the courses I 've taken , are any among the hardest in the ARMENIAN department ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'ARMENIAN' AND program_course.workload = (SELECT ... |
what is the earliest first elected with the results re-elected in the district south carolina 3? | CREATE TABLE table_18116 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Results" text,"Candidates" text) | SELECT MAX("First elected") FROM table_18116 WHERE "Results" = 'Re-elected' AND "District" = 'South Carolina 3' |
return me the journal, which have the most number of papers by ' H. V. Jagadish ' . | CREATE TABLE domain (did int,name varchar)CREATE TABLE writes (aid int,pid int)CREATE TABLE keyword (keyword varchar,kid int)CREATE TABLE domain_publication (did int,pid int)CREATE TABLE cite (cited int,citing int)CREATE TABLE conference (cid int,homepage varchar,name varchar)CREATE TABLE author (aid int,homepage varch... | SELECT journal.name FROM author, journal, publication, writes WHERE author.name = 'H. V. Jagadish' AND publication.jid = journal.jid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY journal.name ORDER BY COUNT(DISTINCT (publication.title)) DESC LIMIT 1 |
Get me the number of patients born before 2180 who had a phosphate urine lab test. | 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 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2180" AND lab.label = "Phosphate, Urine" |
WHO IS THE PLAYER(S) ON THE ROSTER FROM SCHOOL/CLUB TEAM ARIZONA? | CREATE TABLE table_15621965_18 (player VARCHAR,school_club_team VARCHAR) | SELECT player FROM table_15621965_18 WHERE school_club_team = "Arizona" |
i need flight numbers for those flights departing on thursday before 800 from OAKLAND going to SALT LAKE CITY | 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 int,departure_time int,departure_airline text,departure_flight_number int,stop_time int)CREATE TABLE month (month_number int,month_name text)CREATE TABLE flight (aircraft_... | SELECT DISTINCT flight_id FROM flight WHERE (((departure_time < 800 AND flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 24 AND DATE_DAYalias0.month_number = 5 AND DATE_DAYal... |
what is the attendance where the game site is kingdome? | CREATE TABLE table_16729076_1 (attendance INTEGER,game_site VARCHAR) | SELECT MIN(attendance) FROM table_16729076_1 WHERE game_site = "Kingdome" |
Can I take both HBEHED 600 and HBEHED 620 at the same time ? | CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project varchar,has_final_exam varchar,textbook varchar,class_address varch... | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_offering AS COURSE_OFFERING_0, course_offering AS COURSE_OFFERING_1, course_prerequisite WHERE COURSE_OFFERING_1.semester = COURSE_OFFERING_0.semester AND COURSE_0.course_id = COURSE_OFFERING_0.course_id AND COURSE_0.department = 'HBEHED' AND COURS... |
how many patients are diagnosed with the history of tobacco use and tested under the lab category blood gas? | 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 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 tex... | 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 = "History of tobacco use" AND lab."CATEGORY" = "Blood Gas" |
A pie chart showing the proportion of the number of browsers for each accelerator. | CREATE TABLE accelerator_compatible_browser (accelerator_id int,browser_id int,compatible_since_year int)CREATE TABLE Web_client_accelerator (id int,name text,Operating_system text,Client text,Connection text)CREATE TABLE browser (id int,name text,market_share real) | SELECT T3.name, COUNT(T3.name) FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN Web_client_accelerator AS T3 ON T1.accelerator_id = T3.id GROUP BY T3.name |
Which venue has more than 19 against? | CREATE TABLE table_78660 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT "Venue" FROM table_78660 WHERE "Against" > '19' |
Which movies have 'Deleted Scenes' as a substring in the special feature? | CREATE TABLE film (title VARCHAR,special_features VARCHAR) | SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%' |
what's the highest point with lowest point being belle fourche river at south dakota border | CREATE TABLE table_19166 ("State" text,"Highest point" text,"Highest elevation" text,"Lowest point" text,"Lowest elevation" text,"Mean elevation" text) | SELECT "Highest point" FROM table_19166 WHERE "Lowest point" = 'Belle Fourche River at South Dakota border' |
count the number of patients whose diagnoses icd9 code is 78659 and lab test category is blood gas? | 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 lab (subject_id text,hadm_id text,itemid text,charttime tex... | 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.icd9_code = "78659" AND lab."CATEGORY" = "Blood Gas" |
Top SO users from China. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostNoticeT... | SELECT Users.Id, Users.DisplayName, COUNT(Posts.Id), Posts.PostTypeId FROM Users LEFT JOIN Posts ON Users.Id = Posts.OwnerUserId WHERE Posts.Id IS NULL OR Posts.PostTypeId = 1 GROUP BY Users.Id, Users.DisplayName, Posts.PostTypeId HAVING COUNT(Posts.Id) = 0 LIMIT 100 |
How many members did Europe have the year that America had 403892? | CREATE TABLE table_22852 ("Year" real,"Worldwide" real,"Africa" real,"America" real,"Asia" real,"Australia" real,"Europe" real) | SELECT "Europe" FROM table_22852 WHERE "America" = '403892' |
What are the titles of all movies that have rating star is between 3 and 5? | CREATE TABLE reviewer (rid number,name text)CREATE TABLE rating (rid number,mid number,stars number,ratingdate time)CREATE TABLE movie (mid number,title text,year number,director text) | SELECT T2.title FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid WHERE T1.stars BETWEEN 3 AND 5 |
Python posts with minimum score of 15. | CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text... | SELECT Title, Body, CreationDate, Id AS "post_link", Tags, Score FROM Posts WHERE PostTypeId IN (1) AND CreationDate > '2020-01-01' AND CreationDate < '2020-12-31' AND Tags LIKE ('%python%') AND Score >= 15 ORDER BY CreationDate DESC |
what were the three medicines most frequently prescribed until 3 years ago? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid nu... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 3 |
How did the game end against the New Orleans Saints? | CREATE TABLE table_16729071_1 (result VARCHAR,opponent VARCHAR) | SELECT result FROM table_16729071_1 WHERE opponent = "New Orleans Saints" |
Find the names of stadiums which have never had any event. | CREATE TABLE event (name VARCHAR,id VARCHAR,stadium_id VARCHAR)CREATE TABLE stadium (name VARCHAR,id VARCHAR,stadium_id VARCHAR) | SELECT name FROM stadium WHERE NOT id IN (SELECT stadium_id FROM event) |
Final outcome of all questions posted. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,Creatio... | SELECT SUM(CASE WHEN PostHistoryTypeId = 10 THEN 1 ELSE 0 END), SUM(CASE WHEN PostHistoryTypeId = 11 THEN 1 ELSE 0 END) FROM PostHistory |
What engine what in the vehicle when adt champion racing ranked in 1st place? | CREATE TABLE table_71126 ("Year" real,"Entrant" text,"Class" text,"Chassis" text,"Engine" text,"Tyres" text,"Rank" text,"Points" real) | SELECT "Engine" FROM table_71126 WHERE "Rank" = '1st' AND "Entrant" = 'adt champion racing' |
What year is United States school/club team from Arkansas play in Toronto | CREATE TABLE table_name_87 (years_in_toronto VARCHAR,nationality VARCHAR,school_club_team VARCHAR) | SELECT years_in_toronto FROM table_name_87 WHERE nationality = "united states" AND school_club_team = "arkansas" |
what's the date of patient 61527's birth? | 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE cost (row_id number,... | SELECT patients.dob FROM patients WHERE patients.subject_id = 61527 |
after the championship in the hague , netherlands , where were the next championship held ? | CREATE TABLE table_204_445 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text) | SELECT "venue" FROM table_204_445 WHERE id = (SELECT id FROM table_204_445 WHERE "venue" = 'the hague, netherlands') + 1 |
Which Floors have a Location of ljubljana, and a Name of tr3? | CREATE TABLE table_name_61 (floors VARCHAR,location VARCHAR,name VARCHAR) | SELECT floors FROM table_name_61 WHERE location = "ljubljana" AND name = "tr3" |
how many total goals did kit lawlor score from 1950 to 1954 ? | CREATE TABLE table_204_27 (id number,"name" text,"position" text,"year" text,"league\napps" number,"league\ngoals" number,"total\napps" number,"total\ngoals" number,"notes" text) | SELECT "total\ngoals" FROM table_204_27 WHERE "name" = 'kit lawlor' AND "year" = '1950-1954' |
What is the tie no when scunthorpe united was the away team? | CREATE TABLE table_name_6 (tie_no VARCHAR,away_team VARCHAR) | SELECT tie_no FROM table_name_6 WHERE away_team = "scunthorpe united" |
What was the date of the match against western province? | CREATE TABLE table_name_52 (date VARCHAR,opposing_team VARCHAR) | SELECT date FROM table_name_52 WHERE opposing_team = "western province" |
does AA fly from PHILADELPHIA to SAN FRANCISCO | CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE restriction (restriction_code text,advance_purchase i... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.airline_code = 'AA') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = AIRP... |
What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent? | CREATE TABLE Locations (Location_ID VARCHAR,Address VARCHAR)CREATE TABLE Tourist_Attractions (Name VARCHAR,Location_ID VARCHAR,How_to_Get_There VARCHAR) | SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk" |
What is the series episode number that is larger than 262 and has a Segment A entry of Aluminium s canoe? | CREATE TABLE table_name_60 (series_ep VARCHAR,episode VARCHAR,segment_a VARCHAR) | SELECT series_ep FROM table_name_60 WHERE episode > 262 AND segment_a = "aluminium s canoe" |
what flights depart BALTIMORE on friday and arrive in SAN FRANCISCO by 2000 | CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE ground_service (city_code text,airport_code t... | 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 = 25 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.arrival_time <... |
What was the winning team with the 8,132 final attendance? | CREATE TABLE table_56419 ("Season" text,"Cup FinalDate" text,"WinningTeam" text,"Score" text,"LosingTeam" text,"Cup Final Attendance" text) | SELECT "WinningTeam" FROM table_56419 WHERE "Cup Final Attendance" = '8,132' |
What was the average year when shri. shambu nath khajuria won the padma shri awards? | CREATE TABLE table_44278 ("Year" real,"Name" text,"Field" text,"State" text,"Country" text) | SELECT AVG("Year") FROM table_44278 WHERE "Name" = 'shri. shambu nath khajuria' |
What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating? | CREATE TABLE reviewer (rid number,name text)CREATE TABLE movie (mid number,title text,year number,director text)CREATE TABLE rating (rid number,mid number,stars number,ratingdate time) | SELECT T3.name, T2.title, T1.stars, T1.ratingdate FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid JOIN reviewer AS T3 ON T1.rid = T3.rid ORDER BY T3.name, T2.title, T1.stars |
All comments by a given user. | CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostHistory (Id number,Po... | SELECT Id, PostId AS "post_link", Text, Score, CreationDate, UserId AS "user_link" FROM Comments WHERE UserId = '##uid?2129##' ORDER BY CreationDate DESC |
Who was the home team with a score of 101-93? | CREATE TABLE table_9337 ("Date" text,"Home team" text,"Score" text,"Away team" text,"Venue" text,"Box Score" text,"Report" text) | SELECT "Home team" FROM table_9337 WHERE "Score" = '101-93' |
Which player had a height of 6-0? | CREATE TABLE table_17142 ("Player" text,"No.(s)" text,"Height in Ft." text,"Position" text,"Years for Rockets" text,"School/Club Team/Country" text) | SELECT "Player" FROM table_17142 WHERE "Height in Ft." = '6-0' |
What is the record when jameer nelson (19) had the high points? | CREATE TABLE table_27700530_10 (record VARCHAR,high_points VARCHAR) | SELECT record FROM table_27700530_10 WHERE high_points = "Jameer Nelson (19)" |
what was the first time that patient 90917 came into the hospital until 2 years ago? | 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_labitems (row_id number,itemid number,label text)CREATE TABLE labevents (row_id number,subject_id numb... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 90917 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY admissions.admittime LIMIT 1 |
What was the position of the player whose team lost super bowl xxv before 1992, with a team defense rank larger than 3? | CREATE TABLE table_36475 ("Year" real,"NFL Team" text,"Position" text,"Team Defense Rank" real,"Team Performance" text) | SELECT "Position" FROM table_36475 WHERE "Team Defense Rank" > '3' AND "Year" < '1992' AND "Team Performance" = 'lost super bowl xxv' |
When 39 is the amount of ends won who is the skip (club)? | CREATE TABLE table_31195 ("Skip (Club)" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real) | SELECT "Skip (Club)" FROM table_31195 WHERE "Ends Won" = '39' |
What is the Competition with a Score of 1 0, and a Result with 3 0? | CREATE TABLE table_name_17 (competition VARCHAR,score VARCHAR,result VARCHAR) | SELECT competition FROM table_name_17 WHERE score = "1–0" AND result = "3–0" |
What is Left Office, when Took Office is 2006? | CREATE TABLE table_76834 ("Name" text,"Took Office" text,"Left Office" text,"President" text,"Party" text) | SELECT "Left Office" FROM table_76834 WHERE "Took Office" = '2006' |
Which rounds were held on August 9? | CREATE TABLE table_16286 ("Rnd" text,"Race Name" text,"Circuit" text,"City/Location" text,"Date" text,"Pole position" text,"Fastest lap" text,"Winning driver" text,"Winning team" text,"Report" text) | SELECT "Rnd" FROM table_16286 WHERE "Date" = 'August 9' |
What is the Height for Years of Rockets of 2005-06? | CREATE TABLE table_name_44 (height_in_ft VARCHAR,years_for_rockets VARCHAR) | SELECT height_in_ft FROM table_name_44 WHERE years_for_rockets = "2005-06" |
Who is the quarterback for Arkansas State? | CREATE TABLE table_49249 ("Round" real,"Pick #" real,"Player" text,"Position" text,"College" text) | SELECT "Player" FROM table_49249 WHERE "Position" = 'quarterback' AND "College" = 'arkansas state' |
When was Pablo And jar the opponent? | CREATE TABLE table_name_38 (date VARCHAR,opponent VARCHAR) | SELECT date FROM table_name_38 WHERE opponent = "pablo andújar" |
How many routes does American Airlines operate? | CREATE TABLE airlines (alid number,name text,iata text,icao text,callsign text,country text,active text)CREATE TABLE routes (rid number,dst_apid number,dst_ap text,src_apid number,src_ap text,alid number,airline text,codeshare text)CREATE TABLE airports (apid number,name text,city text,country text,x number,y number,el... | SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' |
What percentage of seats were filled in 2006? | CREATE TABLE table_105344_2 (seat_factor VARCHAR,year VARCHAR) | SELECT seat_factor FROM table_105344_2 WHERE year = 2006 |
Give me the comparison about School_ID over the ACC_Regular_Season by a bar chart. | 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 ACC_Regular_Season, School_ID FROM basketball_match |
What is the score of the game where real espana was the home team? | CREATE TABLE table_name_90 (score VARCHAR,home VARCHAR) | SELECT score FROM table_name_90 WHERE home = "real espana" |
which nation was the only one with two top 3 finishers ? | CREATE TABLE table_204_433 (id number,"rank" number,"name" text,"nationality" text,"time" text) | SELECT "nationality" FROM table_204_433 WHERE id <= 3 GROUP BY "nationality" HAVING COUNT(*) = 2 |
give me the number of patients whose year of death is less than or equal to 2165 and item id is 50967? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2165.0" AND lab.itemid = "50967" |
What designer has a restaurant named The Citizen? | CREATE TABLE table_63328 ("Restaurant Name" text,"Original Name" text,"Location" text,"Chef" text,"Designer" text,"Still Open?" text) | SELECT "Designer" FROM table_63328 WHERE "Restaurant Name" = 'the citizen' |
Which venue has a Competition of 2008 myanmar grand royal challenge cup? | CREATE TABLE table_name_91 (venue VARCHAR,competition VARCHAR) | SELECT venue FROM table_name_91 WHERE competition = "2008 myanmar grand royal challenge cup" |
calculate the average age of male patients who have stayed in hospital for 27 days. | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay = "27" |
When 4 clubs are involved, what is the average number of fixtures? | CREATE TABLE table_32040 ("Round" text,"Date(s)" text,"Clubs from the previous round" text,"Clubs involved" real,"Fixtures" real) | SELECT AVG("Fixtures") FROM table_32040 WHERE "Clubs involved" = '4' |
In Adv Material Struct , which courses meet the PreMajor need ? | CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,tota... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Adv Material Struct%' OR course.description LIKE '%Adv Material Struct%' OR course.name LIKE '%A... |
i would like to find a flight from CHARLOTTE NORTH CAROLINA to LAS VEGAS i would like a stopover in ST. LOUIS | 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 airline (airline_code varchar,airline_name text,note text)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE air... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS VEGAS' AND ... |
Which tournament has an Outcome of winner, and a Opponent of dia evtimova? | CREATE TABLE table_name_53 (tournament VARCHAR,outcome VARCHAR,opponent VARCHAR) | SELECT tournament FROM table_name_53 WHERE outcome = "winner" AND opponent = "dia evtimova" |
What year has the wild side of soccer! as the slogan? | CREATE TABLE table_name_89 (year VARCHAR,slogan VARCHAR) | SELECT year FROM table_name_89 WHERE slogan = "the wild side of soccer!" |
Please show different denominations and the corresponding number of schools in descending order. | CREATE TABLE school (Denomination VARCHAR) | SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC |
What is the name of the artist who produced the shortest song? | CREATE TABLE song (artist_name VARCHAR,f_id VARCHAR)CREATE TABLE files (f_id VARCHAR,duration VARCHAR) | SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1 |
i'd like to fly from BOSTON to FORT WORTH | CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'FORT WO... |
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, and order from high to low by the x axis please. | 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 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_CO... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC |
What is 2007, when 2003 is 1R? | CREATE TABLE table_40793 ("Tournament" text,"2000" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2007" FROM table_40793 WHERE "2003" = '1r' |
What is the rank of Club Valencia with a U-17 Caps of 20? | CREATE TABLE table_46395 ("Rank" real,"Player" text,"Club(s)" text,"Year(s)" text,"U-17 Caps" real) | SELECT COUNT("Rank") FROM table_46395 WHERE "Club(s)" = 'valencia' AND "U-17 Caps" = '20' |
Post University has what nickname? | CREATE TABLE table_67251 ("Institution" text,"Location" text,"Nickname" text,"Current Conference" text,"Classification" text) | SELECT "Nickname" FROM table_67251 WHERE "Institution" = 'post university' |
did patient 006-181433 get a lab test during the current hospital visit. | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemic... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433' AND patient.hospitaldischargetime IS NULL)) |
When did the course Vasto to Campitello Matese took place? | CREATE TABLE table_name_25 (date VARCHAR,course VARCHAR) | SELECT date FROM table_name_25 WHERE course = "vasto to campitello matese" |
how many black/cape verdean ethnic background patients have diagnoses icd9 code 1536? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND diagnoses.icd9_code = "1536" |
What was Jim Colbert's score? | CREATE TABLE table_name_72 (score VARCHAR,player VARCHAR) | SELECT score FROM table_name_72 WHERE player = "jim colbert" |
How many positions did player Ben Harpur play? | CREATE TABLE table_17214 ("Round" real,"Overall" text,"Player" text,"Position" text,"Nationality" text,"Club team" text) | SELECT COUNT("Position") FROM table_17214 WHERE "Player" = 'Ben Harpur' |
How many times did the 2nd season have a finale? | CREATE TABLE table_18763 ("Season" text,"Timeslot" text,"Season Premiere" text,"Season Finale" text,"Episodes" real,"TV Season" text,"Ranking" text,"Viewers (in millions)" text) | SELECT COUNT("Season Finale") FROM table_18763 WHERE "Season" = '2nd' |
If the horizontal bar is n/a and the floor is 14.175, what is the number for the parallel bars? | CREATE TABLE table_73043 ("Position" real,"Gymnast" text,"Floor" text,"Pommel Horse" text,"Rings" text,"Vault" text,"Parallel Bars" text,"Horizontal Bar" text,"Total" text) | SELECT "Parallel Bars" FROM table_73043 WHERE "Floor" = '14.175' AND "Horizontal Bar" = 'N/A' |
How many locations are listed in the database? | CREATE TABLE all_documents (document_id number,date_stored time,document_type_code text,document_name text,document_description text,other_details text)CREATE TABLE ref_calendar (calendar_date time,day_number number)CREATE TABLE document_locations (document_id number,location_code text,date_in_location_from time,date_i... | SELECT COUNT(*) FROM ref_locations |
What ANTHRBIO 500 -level courses award 12 credits ? | CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course_p... | SELECT DISTINCT department, name, number FROM course WHERE credits = 12 AND department = 'ANTHRBIO' AND number < 500 + 100 AND number >= 500 |
Find the number of the names of catalog entries with level number 8, order in ascending by the names. | CREATE TABLE Catalog_Contents (catalog_entry_id INTEGER,catalog_level_number INTEGER,parent_entry_id INTEGER,previous_entry_id INTEGER,next_entry_id INTEGER,catalog_entry_name VARCHAR(80),product_stock_number VARCHAR(50),price_in_dollars DOUBLE,price_in_euros DOUBLE,price_in_pounds DOUBLE,capacity VARCHAR(20),length VA... | SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY catalog_entry_name |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.