instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What type of architecture does the Saturn Vue have? | CREATE TABLE table_name_15 (architecture VARCHAR,vehicle_name VARCHAR) | SELECT architecture FROM table_name_15 WHERE vehicle_name = "saturn vue" |
When is the earliest year in milan that guillermo vilas was champion? | CREATE TABLE table_name_43 (year INTEGER,location VARCHAR,champion VARCHAR) | SELECT MIN(year) FROM table_name_43 WHERE location = "milan" AND champion = "guillermo vilas" |
count the number of elective hospital admission patients who have been diagnosed with subarachnoid hemorrhage. | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.long_title = "Subarachnoid hemorrhage" |
how many patients whose days of hospital stay is greater than 34 and drug route is both eyes? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "34" AND prescriptions.route = "BOTH EYES" |
What was Richmond's score when it was the away team? | CREATE TABLE table_55073 ("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_55073 WHERE "Away team" = 'richmond' |
What is the date for the game with an opponent of the Houston Oilers from before week 3? | CREATE TABLE table_39744 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT "Date" FROM table_39744 WHERE "Week" < '3' AND "Opponent" = 'houston oilers' |
Show each location and the number of cinemas there Show bar chart, rank by the bars in descending. | CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_code text)CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price float)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Locatio... | SELECT Location, COUNT(*) FROM cinema GROUP BY Location ORDER BY Location DESC |
which is the only opponent to have used the lambeau field ? | CREATE TABLE table_203_522 (id number,"week" number,"date" text,"opponent" text,"results\nfinal score" text,"results\nteam record" text,"venue" text,"attendance" number) | SELECT "opponent" FROM table_203_522 WHERE "venue" = 'lambeau field' |
What was the original air date of the episode that was directed by Jessica Landaw? | CREATE TABLE table_29042 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (millions)" text) | SELECT "Original air date" FROM table_29042 WHERE "Directed by" = 'Jessica Landaw' |
posts with the most suggested edits. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostN... | SELECT p.Id AS "post_link", SUM(CASE WHEN s.ApprovalDate IS NULL THEN 0 ELSE 1 END) AS "accepted", SUM(CASE WHEN s.ApprovalDate IS NULL THEN 1 ELSE 0 END) AS "rejected", COUNT(*) AS "total" FROM Posts AS p, SuggestedEdits AS s WHERE p.Id = s.PostId GROUP BY p.Id ORDER BY 'total' DESC LIMIT 1000 |
what is the number of patients whose admission location is emergency room admit and item id is 51032? | 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 demographic (subject_id text,hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND lab.itemid = "51032" |
Posts where a given tag was added and removed. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewTaskType... | WITH firstWITHtag_cte AS (SELECT DISTINCT p.Id AS pid, MIN(ph1.Id) AS phWITHId FROM PostHistory AS ph1 INNER JOIN Posts AS p ON ph1.PostId = p.Id WHERE ph1.PostHistoryTypeId IN (3, 6, 9) AND ph1.Text LIKE '%<##tagName##>%' GROUP BY p.Id), firstWITHouttag_cte AS (SELECT pid, phWITHId, MIN(ph2.Id) AS phWITHoutId FROM fir... |
What is maximum, minimum and average amount of outstanding of customer? | CREATE TABLE addresses (address_id number,line_1_number_building text,city text,zip_postcode text,state_province_county text,country text)CREATE TABLE staff (staff_id number,staff_address_id number,nickname text,first_name text,middle_name text,last_name text,date_of_birth time,date_joined_staff time,date_left_staff ti... | SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM customers |
What kind of Chassis supports a Maserati Straight-6 engine with Points greater than 0 and built in the year 1955? | CREATE TABLE table_name_93 (chassis VARCHAR,year VARCHAR,engine VARCHAR,points VARCHAR) | SELECT chassis FROM table_name_93 WHERE engine = "maserati straight-6" AND points > 0 AND year = 1955 |
how many patients whose admission year is less than 2157 and diagnoses icd9 code is 82022? | 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 demographic (subject_id text,hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2157" AND diagnoses.icd9_code = "82022" |
what is drug type and drug name of drug code hydz20i? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita... | SELECT prescriptions.drug_type, prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "HYDZ20I" |
What is the Location of the 10th Iteration? | CREATE TABLE table_name_40 (location VARCHAR,iteration VARCHAR) | SELECT location FROM table_name_40 WHERE iteration = "10th" |
what game was in chicago | CREATE TABLE table_name_40 (record VARCHAR,home VARCHAR) | SELECT record FROM table_name_40 WHERE home = "chicago" |
Which 2nd day has a year prior to 2009? | CREATE TABLE table_name_4 (year INTEGER) | SELECT 2 AS nd_day FROM table_name_4 WHERE year < 2009 |
What is the area (km2) for the place with a 2010 population of 153085? | CREATE TABLE table_28316 ("City / Municipality" text,"Date of Creation" text,"Area (km 2)" text,"Population (2010)" real,"Income Classification (DOF)" text) | SELECT "Area (km 2 )" FROM table_28316 WHERE "Population (2010)" = '153085' |
What's the whole range of united states where road race is ottawa marathon | CREATE TABLE table_28345 ("Road race" text,"Distance" text,"Location" text,"Country" text,"Month held" text) | SELECT COUNT("Country") FROM table_28345 WHERE "Road race" = 'Ottawa Marathon' |
What is the party affiliation of Virginia Foxx? | CREATE TABLE table_name_57 (party VARCHAR,incumbent VARCHAR) | SELECT party FROM table_name_57 WHERE incumbent = "virginia foxx" |
What was the total for the golfer who had a year won of 1987? | CREATE TABLE table_50676 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Total" FROM table_50676 WHERE "Year(s) won" = '1987' |
Name the proto-austrronesian for *pine, *papine | CREATE TABLE table_20157 ("Kinship" text,"Proto-Austronesian" text,"Proto-Malayo-Polynesian" text,"Proto-Oceanic" text,"Proto-Polynesian" text) | SELECT "Proto-Austronesian" FROM table_20157 WHERE "Proto-Oceanic" = '*pine, *papine' |
What is Anders Forsbrand's score with a to par of +1? | CREATE TABLE table_name_64 (score VARCHAR,to_par VARCHAR,player VARCHAR) | SELECT score FROM table_name_64 WHERE to_par = "+1" AND player = "anders forsbrand" |
What was the lowest city population for the district of rajanpur district with a area of 6 km squared and a serial number less than 29? | CREATE TABLE table_name_15 (city_population__2009_ INTEGER,serial_no VARCHAR,city_area_km_2__ VARCHAR,district VARCHAR) | SELECT MIN(city_population__2009_) FROM table_name_15 WHERE city_area_km_2__ = 6 AND district = "rajanpur district" AND serial_no < 29 |
The Ring of Steel possesses what ISBN? | CREATE TABLE table_2950964_5 (isbn VARCHAR,title VARCHAR) | SELECT isbn FROM table_2950964_5 WHERE title = "The Ring Of Steel" |
Scatterplot of card_number vs customer id by card_type_code | CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,account_name VARCHAR(50),other_account_details VARCHAR(255))CREATE TABLE Customers_Cards (card_id INTEGER,customer_id INTEGER,card_type_code VARCHAR(15),card_number VARCHAR(80),date_valid_from DATETIME,date_valid_to DATETIME,other_card_details VARCHAR(255))C... | SELECT customer_id, card_number FROM Customers_Cards GROUP BY card_type_code |
how much does sao2 change for patient 011-23004 last measured on the last icu visit compared to the value first measured on the last icu visit? | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT (SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-23004') AND NOT patient.unitdischargetime IS NULL ... |
What was the date of the footscray home game? | CREATE TABLE table_name_46 (date VARCHAR,home_team VARCHAR) | SELECT date FROM table_name_46 WHERE home_team = "footscray" |
What name has 8 as the number? | CREATE TABLE table_name_5 (name VARCHAR,number VARCHAR) | SELECT name FROM table_name_5 WHERE number = "8" |
What is the L when the skip club is Jeff Richard (kelowna)? | CREATE TABLE table_31220 ("Skip (Club)" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real) | SELECT MAX("L") FROM table_31220 WHERE "Skip (Club)" = 'Jeff Richard (Kelowna)' |
Name the evening gown for swimsuit more than 9.51 for maryland | CREATE TABLE table_name_90 (evening_gown VARCHAR,swimsuit VARCHAR,country VARCHAR) | SELECT evening_gown FROM table_name_90 WHERE swimsuit > 9.51 AND country = "maryland" |
What genre is revolving doors of vengeance ? | CREATE TABLE table_52123 ("Airing date" text,"English title (Chinese title)" text,"Number of episodes" real,"Genre" text,"Official website" text) | SELECT "Genre" FROM table_52123 WHERE "English title (Chinese title)" = 'revolving doors of vengeance 酒店風雲' |
In what Town/City is Nana Museum of The Arctic located? | CREATE TABLE table_34532 ("Name" text,"Town/City" text,"Borough" text,"Region" text,"Type" text) | SELECT "Town/City" FROM table_34532 WHERE "Name" = 'nana museum of the arctic' |
What episode number in the series originally aired on February 25, 2001? | CREATE TABLE table_22592 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT "No. in series" FROM table_22592 WHERE "Original air date" = 'February 25, 2001' |
how many festivals were held after 2012 ? | CREATE TABLE table_204_337 (id number,"festival" text,"year" number,"award" text,"nominee" text,"result" text) | SELECT COUNT("festival") FROM table_204_337 WHERE "year" > 2012 |
What is the points when played is less than 38? | CREATE TABLE table_47403 ("Position" real,"Club" text,"Played" real,"Points" real,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real) | SELECT SUM("Points") FROM table_47403 WHERE "Played" < '38' |
count the number of patients whose year of birth is less than 2060 and lab test fluid is ascites? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2060" AND lab.fluid = "Ascites" |
What is the result against Clemson? | CREATE TABLE table_7232 ("Date" text,"Opponent" text,"Location" text,"Result" text,"Attendance" real) | SELECT "Result" FROM table_7232 WHERE "Opponent" = 'clemson' |
Name the number of mens doubles for 2004/2005 | CREATE TABLE table_17526 ("Season" text,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text) | SELECT COUNT("Mens doubles") FROM table_17526 WHERE "Season" = '2004/2005' |
What are the ids of documents which don't have expense budgets? | CREATE TABLE Documents_with_expenses (document_id VARCHAR)CREATE TABLE Documents (document_id VARCHAR) | SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses |
what is the maximum total cost of a hospital with t3 since 5 years ago? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE allergy (allergyid number,patientunitst... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 't3')) AND DATETIME(cost.chargetime) >= DATETIME(CURRENT_TIME(), '-5 ... |
Is Prof. Kubena the only teacher of Pd Anes Rotatn ? | CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varchar,has_projects varchar,has_exams varchar,num_reviews int,clarity_score i... | SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Pd Anes Rotatn%' AND NOT instructor.name LIKE '%Kubena%' AND offering_instructor.instructor_id = instruct... |
Which 2005 06 Pts has a Team of estudiantes (lp), and a 2006 07 Pts smaller than 81? | CREATE TABLE table_13020 ("Team" text,"2005\u201306 Pts" real,"2006\u201307 Pts" real,"2007\u201308 Pts" real,"Total Pts" real,"Total Pld" real) | SELECT COUNT("2005\u201306 Pts") FROM table_13020 WHERE "Team" = 'estudiantes (lp)' AND "2006\u201307 Pts" < '81' |
Which venue has an Away team of south melbourne? | CREATE TABLE table_name_14 (venue VARCHAR,away_team VARCHAR) | SELECT venue FROM table_name_14 WHERE away_team = "south melbourne" |
Number of questions tagged with 'qt' and ('iOS' or 'Android'). | 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,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta... | SELECT COUNT(*) FROM (SELECT PostId FROM PostTags WHERE TagId IN (SELECT Id FROM Tags WHERE TagName LIKE '%qt%') INTERSECT (SELECT PostId FROM PostTags WHERE TagId IN (SELECT Id FROM Tags WHERE TagName LIKE '%ios%') UNION SELECT PostId FROM PostTags WHERE TagId IN (SELECT Id FROM Tags WHERE TagName LIKE '%android%'))) ... |
Which Max 1-min wind mph (km/h) that has Dates active on september22 september28? | CREATE TABLE table_38470 ("Storm name" text,"Dates active" text,"Max 1-min wind mph (km/h)" text,"Min. press. (mbar)" text,"Damage (millions USD)" text,"Deaths" text) | SELECT "Max 1-min wind mph (km/h)" FROM table_38470 WHERE "Dates active" = 'september22– september28' |
which game at most has the most high rebounds ? | CREATE TABLE table_204_833 (id number,"game" number,"date" text,"team" text,"score" text,"high points" text,"high rebounds" text,"high assists" text,"location\nattendance" text,"record" text) | SELECT "game" FROM table_204_833 ORDER BY "high rebounds" DESC LIMIT 1 |
show me the available flights from SAN FRANCISCO to BOSTON on 11 24 | CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flight_number int,from_airport varchar,meal_code text,stops int,time_elapsed int,to_airport varchar)CREATE TABLE restriction (res... | 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 = 'BOSTON' AND date_day.day_number = 24 AND date_day.month_number = 11 AND d... |
What was the date of the game when the record of the series was 0 1? | CREATE TABLE table_name_10 (date VARCHAR,series VARCHAR) | SELECT date FROM table_name_10 WHERE series = "0–1" |
What's the date of the circuit Winton Motor Raceway? | CREATE TABLE table_62737 ("Race Title" text,"Circuit" text,"City / State" text,"Date" text,"Winner" text) | SELECT "Date" FROM table_62737 WHERE "Circuit" = 'winton motor raceway' |
Name the least purse for 2011 | CREATE TABLE table_15618241_1 (purse___us INTEGER,year VARCHAR) | SELECT MIN(purse___us) AS $__ FROM table_15618241_1 WHERE year = 2011 |
how many patients with candidiasis of skin and nails diagnoses have been hospitalized for more than 4 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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "4" AND diagnoses.long_title = "Candidiasis of skin and nails" |
How many times is the country ireland and points more than 4? | CREATE TABLE table_64149 ("Rank" text,"Country" text,"Jerseys" real,"Vuelta Wins" real,"Points" real,"Combo'" real,"Different holders" real) | SELECT COUNT("Vuelta Wins") FROM table_64149 WHERE "Country" = 'ireland' AND "Points" > '4' |
What are the ids of all students who have advisor number 1121? | CREATE TABLE plays_games (stuid number,gameid number,hours_played number)CREATE TABLE video_games (gameid number,gname text,gtype text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE sportsinfo (stuid number,sportname text,hoursperweek... | SELECT stuid FROM student WHERE advisor = 1121 |
provide the number of patients whose language is port and days of hospital stay is greater than 6? | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "PORT" AND demographic.days_stay > "6" |
Notre-Dame-De-Lourdes has what average area km 2? | CREATE TABLE table_name_46 (area_km_2 INTEGER,official_name VARCHAR) | SELECT AVG(area_km_2) FROM table_name_46 WHERE official_name = "notre-dame-de-lourdes" |
How many patients of white russian ethnicity had a procedure for dorsal and dorsolumbar fusion of the posterior column posterior technique? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND procedures.long_title = "Dorsal and dorsolumbar fusion of the posterior column, posterior technique" |
What is the country associated with the date in 2003? | CREATE TABLE table_name_34 (country VARCHAR,date VARCHAR) | SELECT country FROM table_name_34 WHERE date = "2003" |
Who had the high points when the score was w 112-110? | CREATE TABLE table_74217 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High points" FROM table_74217 WHERE "Score" = 'W 112-110' |
When did the opponent knockout Barry Prior in more than 2 rounds? | CREATE TABLE table_31660 ("Date" text,"Result" text,"Opponent" text,"Method" text,"Round" real) | SELECT "Date" FROM table_31660 WHERE "Method" = 'knockout' AND "Round" > '2' AND "Opponent" = 'barry prior' |
what was the name of the specimen test that patient 61683 had received the first time until 09/2104? | 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 icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,inti... | SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61683) AND STRFTIME('%y-%m', microbiologyevents.charttime) <= '2104-09' ORDER BY microbiologyevents.charttime LIMIT 1 |
Who did the Seahawks play when the listed attendance was 61615? | CREATE TABLE table_13258876_2 (opponent VARCHAR,attendance VARCHAR) | SELECT opponent FROM table_13258876_2 WHERE attendance = 61615 |
what are all the result for New York 16 district | CREATE TABLE table_674 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Result" FROM table_674 WHERE "District" = 'New York 16' |
Waht is the Country of the play by Author Aristophanes? | CREATE TABLE table_name_25 (country VARCHAR,author VARCHAR) | SELECT country FROM table_name_25 WHERE author = "aristophanes" |
What is the No. 8 of the person with a No. 4 of Matthew and a No. 7 of Anthony? | CREATE TABLE table_name_29 (no_8 VARCHAR,no_4 VARCHAR,no_7 VARCHAR) | SELECT no_8 FROM table_name_29 WHERE no_4 = "matthew" AND no_7 = "anthony" |
In what nation did Darko Sovran place third? | CREATE TABLE table_35951 ("Nation" text,"Skip" text,"Third" text,"Second" text,"Lead" text) | SELECT "Nation" FROM table_35951 WHERE "Third" = 'darko sovran' |
How many professors have a Ph.D. in each department. Show bar chart. | CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_CODE varchar(8),EMP_NUM int,DEPT_ADDRESS varchar(20),DEPT_EXTENSION varchar(4))CREATE TABLE 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),... | SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE |
who finished the same amount of laps as belmondo ? | CREATE TABLE table_204_788 (id number,"pos" text,"no" number,"driver" text,"constructor" text,"laps" number,"time/retired" text,"grid" number,"points" number) | SELECT "driver" FROM table_204_788 WHERE "driver" <> 'paul belmondo' AND "laps" = (SELECT "laps" FROM table_204_788 WHERE "driver" = 'paul belmondo') |
What is the Q1+Q2 time for the driver whose Q1 order was 13? | CREATE TABLE table_name_35 (q1 VARCHAR,q2_time VARCHAR,q1_order VARCHAR) | SELECT q1 + q2_time FROM table_name_35 WHERE q1_order = 13 |
What was the maximum population of the country with Quito as capital? | CREATE TABLE table_3644 ("Country or territory with flag" text,"Area (km\u00b2) (per sqmi)" text,"Population (July 2009 est.)" real,"Population density per km\u00b2" text,"Capital" text) | SELECT MAX("Population (July 2009 est.)") FROM table_3644 WHERE "Capital" = 'Quito' |
What's the status of the player with 3041 points? | CREATE TABLE table_27615896_20 (status VARCHAR,points VARCHAR) | SELECT status FROM table_27615896_20 WHERE points = 3041 |
What is the sum of games Played by the Team Vasco Da Gama, with fewer than 12 Against? | CREATE TABLE table_name_12 (played INTEGER,team VARCHAR,against VARCHAR) | SELECT SUM(played) FROM table_name_12 WHERE team = "vasco da gama" AND against < 12 |
What is the number of Last Runners-up that has the club name of dempo sc? | CREATE TABLE table_34402 ("Club" text,"Wins" real,"Last Win" text,"Runners-up" real,"Last Runners-up" real) | SELECT SUM("Last Runners-up") FROM table_34402 WHERE "Club" = 'dempo sc' |
what is the location for saturday, april 21 | CREATE TABLE table_27893892_2 (game_site VARCHAR,date VARCHAR) | SELECT game_site FROM table_27893892_2 WHERE date = "Saturday, April 21" |
Show each school name, its budgeted amount, and invested amount in year 2002 or after. | CREATE TABLE school (school_id text,school_name text,location text,mascot text,enrollment number,ihsaa_class text,ihsaa_football_class text,county text)CREATE TABLE endowment (endowment_id number,school_id number,donator_name text,amount number)CREATE TABLE budget (school_id number,year number,budgeted number,total_bud... | SELECT T2.school_name, T1.budgeted, T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002 |
known active infection or chronic infection with hiv, hbv or hcv | CREATE TABLE table_test_22 ("id" int,"ejection_fraction_ef" int,"pregnancy_or_lactation" bool,"child_pugh_class" string,"hbv" bool,"systolic_blood_pressure_sbp" int,"active_infection" bool,"leukocyte_count" int,"hiv_infection" bool,"left_ventricular_dysfunction" bool,"active_inflammatory_diseases" bool,"hcv" bool,"neut... | SELECT * FROM table_test_22 WHERE active_infection = 1 OR active_infection = 1 AND (hiv_infection = 1 OR hbv = 1 OR hcv = 1) |
What is the home team that hosted an away team with a score of 21.15 (141)? | CREATE TABLE table_11686 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_11686 WHERE "Away team score" = '21.15 (141)' |
When michael reihs is the mountains classification what is the stage? | CREATE TABLE table_30466 ("Stage" real,"Winner" text,"General classification" text,"Points classification" text,"Mountains classification" text,"Young rider classification" text,"Team classification" text) | SELECT "Stage" FROM table_30466 WHERE "Mountains classification" = 'Michael Reihs' |
What is the name of the director who directed the movie that Raintree Pictures produced? | CREATE TABLE table_6959 ("Date" text,"Title" text,"Director" text,"Producer" text,"Production Cost" text,"Singapore Gross" text) | SELECT "Director" FROM table_6959 WHERE "Producer" = 'raintree pictures' |
What was the result on 1990-11-04? | CREATE TABLE table_11348 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Attendance" text) | SELECT "Result" FROM table_11348 WHERE "Date" = '1990-11-04' |
What's Round has a Surface of hard and Opponent of Jelena Simic? | CREATE TABLE table_name_51 (round VARCHAR,surface VARCHAR,opponent VARCHAR) | SELECT round FROM table_name_51 WHERE surface = "hard" AND opponent = "jelena simic" |
how many historic sites are listed in coldwater ? | CREATE TABLE table_204_423 (id number,"name" text,"location" text,"city" text,"listing date" text) | SELECT COUNT("name") FROM table_204_423 WHERE "city" = 'coldwater' |
In the 2008/2009 season one team had 47 tries against, how many games did they win that year? | CREATE TABLE table_13399573_4 (won VARCHAR,tries_against VARCHAR) | SELECT won FROM table_13399573_4 WHERE tries_against = "47" |
What Title has the Label of Columbia and Standard number of CODC-8760? | CREATE TABLE table_name_27 (title VARCHAR,label VARCHAR,standard_number VARCHAR) | SELECT title FROM table_name_27 WHERE label = "columbia" AND standard_number = "codc-8760" |
What is Acquisition via, when Season is 2006-2012? | CREATE TABLE table_name_50 (acquisition_via VARCHAR,season VARCHAR) | SELECT acquisition_via FROM table_name_50 WHERE season = "2006-2012" |
WHAT IS THE GRID OF HONDA, WITH 24 LAPS AND Time/Retired of +13.997? | CREATE TABLE table_name_22 (grid VARCHAR,time_retired VARCHAR,manufacturer VARCHAR,laps VARCHAR) | SELECT grid FROM table_name_22 WHERE manufacturer = "honda" AND laps = "24" AND time_retired = "+13.997" |
What stadium held the game that had a score of 6 3? | CREATE TABLE table_name_71 (stadium VARCHAR,score VARCHAR) | SELECT stadium FROM table_name_71 WHERE score = "6–3" |
Which league gets paid the most? | CREATE TABLE salary (year number,team_id text,league_id text,player_id text,salary number)CREATE TABLE hall_of_fame (player_id text,yearid number,votedby text,ballots text,needed text,votes text,inducted text,category text,needed_note text)CREATE TABLE player_award (player_id text,award_id text,year number,league_id te... | SELECT league_id FROM salary GROUP BY league_id ORDER BY SUM(salary) DESC LIMIT 1 |
For all employees who have the letters D or S in their first name, draw a line chart about the change of commission_pct over hire_date . | CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGIO... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' |
What away team scored 18.14 (122)? | CREATE TABLE table_33144 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team" FROM table_33144 WHERE "Away team score" = '18.14 (122)' |
What was the result of the games VS the Lions? | CREATE TABLE table_24123547_2 (final_score VARCHAR,opponent VARCHAR) | SELECT final_score FROM table_24123547_2 WHERE opponent = "Lions" |
egfr > 60 | CREATE TABLE table_train_234 ("id" int,"orthostatic_hypotension" bool,"systolic_blood_pressure_sbp" int,"estimated_glomerular_filtration_rate_egfr" int,"postural_fall_of_dbp" int,"diastolic_blood_pressure_dbp" int,"postural_fall_of_sbp" int,"allergy_to_sglt_2_inhibitors" bool,"body_mass_index_bmi" float,"NOUSE" float) | SELECT * FROM table_train_234 WHERE estimated_glomerular_filtration_rate_egfr > 60 |
What is the average number of laps when the country was NL and the race number was smaller than 8? | CREATE TABLE table_4935 ("Position" text,"Race Number" real,"Driver" text,"Country" text,"Laps" real) | SELECT AVG("Laps") FROM table_4935 WHERE "Race Number" < '8' AND "Country" = 'nl' |
Find tags differing by dots and dashes only with no synonym. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTas... | SELECT Tags.TagName AS NoDotDashTagName, Tags.Count AS NoDotDashTagCount, Tags2.TagName AS DotDashTagName, Tags2.Count AS DotDashTagCount FROM Tags CROSS JOIN Tags AS Tags2 WHERE Tags.TagName != Tags2.TagName AND (REPLACE(REPLACE(Tags2.TagName, '.', ''), '-', '') = Tags.TagName) AND NOT EXISTS(SELECT * FROM TagSynonyms... |
Find the number of the names of Japanese constructors that have once earned more than 5 points?, show X in asc order. | CREATE TABLE qualifying (qualifyId INTEGER,raceId INTEGER,driverId INTEGER,constructorId INTEGER,number INTEGER,position INTEGER,q1 TEXT,q2 TEXT,q3 TEXT)CREATE TABLE drivers (driverId INTEGER,driverRef TEXT,number TEXT,code TEXT,forename TEXT,surname TEXT,dob TEXT,nationality TEXT,url TEXT)CREATE TABLE races (raceId IN... | SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY name |
What is the average Total with a Rank greater than 1, and a Bronze larger than 8? | CREATE TABLE table_name_3 (total INTEGER,rank VARCHAR,bronze VARCHAR) | SELECT AVG(total) FROM table_name_3 WHERE rank > 1 AND bronze > 8 |
What's the Score listed that has a Result of 1-0? | CREATE TABLE table_52996 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Score" FROM table_52996 WHERE "Result" = '1-0' |
List the codes of all courses that take place in room KLR209. | CREATE TABLE student (stu_num number,stu_lname text,stu_fname text,stu_init text,stu_dob time,stu_hrs number,stu_class text,stu_gpa number,stu_transfer number,dept_code text,stu_phone text,prof_num number)CREATE TABLE class (class_code text,crs_code text,class_section text,class_time text,class_room text,prof_num numbe... | SELECT class_code FROM class WHERE class_room = 'KLR209' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.