instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id. | CREATE TABLE Benefits_Overpayments (council_tax_id VARCHAR,cmi_cross_ref_id VARCHAR)CREATE TABLE CMI_Cross_References (source_system_code VARCHAR,cmi_cross_ref_id VARCHAR) | SELECT T1.source_system_code, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id |
What kind of Silver has a Rank of 3, and a Gold smaller than 2? | CREATE TABLE table_name_9 (silver VARCHAR,rank VARCHAR,gold VARCHAR) | SELECT COUNT(silver) FROM table_name_9 WHERE rank = "3" AND gold < 2 |
What is the largest number played with 16 points in a position over 4? | CREATE TABLE table_8894 ("Position" real,"Name" text,"Played" real,"Drawn" real,"Lost" real,"Points" real) | SELECT MAX("Played") FROM table_8894 WHERE "Points" = '16' AND "Position" > '4' |
Next semester , what classes are offered at 300 -level ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category 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 (course_id int,name varchar,department varchar,number varchar,credits var... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester... |
What place is David Graham in? | CREATE TABLE table_name_47 (place VARCHAR,player VARCHAR) | SELECT place FROM table_name_47 WHERE player = "david graham" |
How many times was the time 20' 05.19 112.703mph on Thurs Aug 26th? | CREATE TABLE table_26986076_1 (sat_21_aug VARCHAR,thurs_26_aug VARCHAR) | SELECT COUNT(sat_21_aug) FROM table_26986076_1 WHERE thurs_26_aug = "20' 05.19 112.703mph" |
What was the publication date of the photos of Sean Preston Federline that cost $500,000 and were published by People? | CREATE TABLE table_80032 ("Type" text,"Person(s)" text,"Publisher(s)" text,"Publication date" text,"Reported price" text) | SELECT "Publication date" FROM table_80032 WHERE "Reported price" = '$500,000' AND "Publisher(s)" = 'people' AND "Person(s)" = 'sean preston federline' |
what's the result with district being washington 7 | CREATE TABLE table_18184 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Result" FROM table_18184 WHERE "District" = 'Washington 7' |
Get me the number of white russian patients born before year 2103. | 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.ethnicity = "WHITE - RUSSIAN" AND demographic.dob_year < "2103" |
what is procedure long title of subject id 2560? | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "2560" |
Which October has a Record of 5 1 0, and a Game larger than 6? | CREATE TABLE table_name_2 (october INTEGER,record VARCHAR,game VARCHAR) | SELECT AVG(october) FROM table_name_2 WHERE record = "5–1–0" AND game > 6 |
What's the winner of the Painewebber Invitational tournament? | CREATE TABLE table_11622562_1 (winner VARCHAR,tournament VARCHAR) | SELECT winner FROM table_11622562_1 WHERE tournament = "PaineWebber Invitational" |
What is the platform if the weight is 131.5g? | CREATE TABLE table (platform VARCHAR,weight VARCHAR) | SELECT platform FROM table WHERE weight = "131.5g" |
What player played for the Balmain Tigers? | CREATE TABLE table_4885 ("Year" text,"Player" text,"Nationality" text,"Position" text,"Club" text) | SELECT "Player" FROM table_4885 WHERE "Club" = 'balmain tigers' |
Who is the auther when the english name was histories and eulogies of the sovereigns? | CREATE TABLE table_22464685_1 (author VARCHAR,english_name VARCHAR) | SELECT author FROM table_22464685_1 WHERE english_name = "Histories and Eulogies of the Sovereigns" |
Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , show by the y axis 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 ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_ID |
Which group nominated Kim in years before 2010 for Thirst? | CREATE TABLE table_6034 ("Year" real,"Group" text,"Award" text,"Film/Series" text,"Result" text) | SELECT "Group" FROM table_6034 WHERE "Year" < '2010' AND "Film/Series" = 'thirst' |
what is the title when the imprint is dengeki bunko and the artist is kiyotaka haimura? | CREATE TABLE table_9571 ("Year" real,"Character" text,"Title" text,"Author" text,"Artist" text,"Imprint" text) | SELECT "Title" FROM table_9571 WHERE "Imprint" = 'dengeki bunko' AND "Artist" = 'kiyotaka haimura' |
Who is iv n navarro's opponent? | CREATE TABLE table_66230 ("!Event" real,"Round" text,"Surface" text,"Winner" text,"Opponent" text,"Result" text) | SELECT "Opponent" FROM table_66230 WHERE "Result" = 'iván navarro' |
what is the cheapest fare for a one way flight from BOSTON to ATLANTA | CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_spe... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... |
what is maximum age of patients whose insurance is private and discharge location is home health care? | 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 MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "HOME HEALTH CARE" |
When Pasadena is at 10%, what is La Crescenta-Montrose? | CREATE TABLE table_78544 ("Tujunga" text,"La Crescenta- Montrose" text,"Glendale" text,"La Ca\u00f1ada Flintridge" text,"Pasadena" text) | SELECT "La Crescenta- Montrose" FROM table_78544 WHERE "Pasadena" = '10%' |
What is Notes, when Bronze is 'Pasi Ikonen'? | CREATE TABLE table_12387 ("Year" real,"Gold" text,"Silver" text,"Bronze" text,"Notes" text) | SELECT "Notes" FROM table_12387 WHERE "Bronze" = 'pasi ikonen' |
How many vacators were in the Pennsylvania 33rd district? | CREATE TABLE table_73389 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT COUNT("Vacator") FROM table_73389 WHERE "District" = 'Pennsylvania 33rd' |
Name the number of wheel arrangement when class is d14 | CREATE TABLE table_15608800_2 (wheel_arrangement VARCHAR,class VARCHAR) | SELECT COUNT(wheel_arrangement) FROM table_15608800_2 WHERE class = "D14" |
What si the 2011 number (,000) when 2001 % is 28.1? | CREATE TABLE table_74105 ("Status" text,"2001 number (,000)" real,"2001 %" text,"2011 number (,000)" real,"2011 %" text) | SELECT MAX("2011 number (,000)") FROM table_74105 WHERE "2001 %" = '28.1' |
Can you tell me the highest Total votes that has the % of popular vote of 0.86%, and the # of seats won larger than 0? | CREATE TABLE table_45694 ("Election" real,"Candidates fielded" real,"# of seats won" real,"Total votes" real,"% of popular vote" text,"Place" text) | SELECT MAX("Total votes") FROM table_45694 WHERE "% of popular vote" = '0.86%' AND "# of seats won" > '0' |
What is Venue, when Date is '14/12/1996'? | CREATE TABLE table_62618 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT "Venue" FROM table_62618 WHERE "Date" = '14/12/1996' |
What is the number of results for james shannon? | CREATE TABLE table_714 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT COUNT("Result") FROM table_714 WHERE "Incumbent" = 'James Shannon' |
Which Played has a Lost larger than 4, and a Team of am rica, and Points smaller than 5? | CREATE TABLE table_name_4 (played INTEGER,points VARCHAR,lost VARCHAR,team VARCHAR) | SELECT SUM(played) FROM table_name_4 WHERE lost > 4 AND team = "américa" AND points < 5 |
What is the yacht type of Icap Leopard? | CREATE TABLE table_25561560_2 (yacht VARCHAR) | SELECT yacht AS type FROM table_25561560_2 WHERE yacht = "ICAP Leopard" |
What is the Set 5 with a Date that is jun 29? | CREATE TABLE table_42319 ("Date" text,"Score" text,"Set 1" text,"Set 2" text,"Set 3" text,"Set 4" text,"Set 5" text,"Total" text) | SELECT "Set 5" FROM table_42319 WHERE "Date" = 'jun 29' |
What is the lowest Long, when Name is Kass, Rob, and when Avg/g is less than -0.30000000000000004? | CREATE TABLE table_name_81 (long INTEGER,name VARCHAR,avg_g VARCHAR) | SELECT MIN(long) FROM table_name_81 WHERE name = "kass, rob" AND avg_g < -0.30000000000000004 |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and manufacturer , and group by attribute founder, and could you sort by the bar in asc? | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | 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 |
What is the value in 1988 when it is 2R in 1997 and SF in 1993? | CREATE TABLE table_name_41 (Id VARCHAR) | SELECT 1988 FROM table_name_41 WHERE 1997 = "2r" AND 1993 = "sf" |
Namethe school team for season 2008 | CREATE TABLE table_1261 ("Name" text,"Position" text,"Number" real,"School/Club Team" text,"Season" text,"Acquisition via" text) | SELECT "School/Club Team" FROM table_1261 WHERE "Season" = '2008' |
Wins of 0, and a Rank larger than 6, and a Manufacturer of kawasaki, and a Rider of massimo broccoli involved what highest points? | CREATE TABLE table_name_18 (points INTEGER,rider VARCHAR,manufacturer VARCHAR,wins VARCHAR,rank VARCHAR) | SELECT MAX(points) FROM table_name_18 WHERE wins = 0 AND rank > 6 AND manufacturer = "kawasaki" AND rider = "massimo broccoli" |
Which player was pick number 150? | CREATE TABLE table_16376436_1 (player VARCHAR,pick__number VARCHAR) | SELECT player FROM table_16376436_1 WHERE pick__number = 150 |
what is the number of patients whose days of hospital stay is greater than 20 and procedure icd9 code is 9907? | 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.days_stay > "20" AND procedures.icd9_code = "9907" |
What position is the player from Chapel Hill, NC? | CREATE TABLE table_20785990_2 (position VARCHAR,home_town VARCHAR) | SELECT position FROM table_20785990_2 WHERE home_town = "Chapel Hill, NC" |
who is the driver for the car constructed by ferrari with a time/retired of +1:06.683? | CREATE TABLE table_name_43 (driver VARCHAR,constructor VARCHAR,time_retired VARCHAR) | SELECT driver FROM table_name_43 WHERE constructor = "ferrari" AND time_retired = "+1:06.683" |
What was the result when Leo E. Allen was elected? | CREATE TABLE table_1342013_12 (result VARCHAR,incumbent VARCHAR) | SELECT result FROM table_1342013_12 WHERE incumbent = "Leo E. Allen" |
Top 10 Questions by view. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId numbe... | SELECT Id, Body, Title, OwnerDisplayName, ViewCount FROM Posts ORDER BY ViewCount DESC LIMIT 10 |
flights from DENVER to PITTSBURGH on thursday | CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE equipment_sequence (aircraft_cod... | 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 = 'PITTSBURGH' AND date_day.day_number = 24 AND date_day.month_number = 5 AN... |
Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps? | CREATE TABLE table_name_25 (class VARCHAR,laps VARCHAR,year VARCHAR,team VARCHAR) | SELECT class AS pos FROM table_name_25 WHERE year > 1997 AND team = "corvette racing" AND class = "gt1" AND laps = 327 |
What is the highest number of laps with a 21 start? | CREATE TABLE table_69502 ("Year" text,"Start" text,"Qual" text,"Rank" text,"Finish" text,"Laps" real) | SELECT MAX("Laps") FROM table_69502 WHERE "Start" = '21' |
Find products with max page size as 'A4' and pages per minute color smaller than 5. | CREATE TABLE product (product VARCHAR,max_page_size VARCHAR,pages_per_minute_color VARCHAR) | SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5 |
What was the away team's score in Junction Oval? | CREATE TABLE table_56111 ("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_56111 WHERE "Venue" = 'junction oval' |
SELECT * FROM posts WHERE Id < 100000 and AnswerCount > 0 and Tags NOT NULL. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location tex... | SELECT * FROM Posts WHERE Id < 100000 AND AnswerCount > 0 AND NOT Tags IS NULL |
Name the horsepower for VIN code of h and engine for 351-2v cleveland v8 | CREATE TABLE table_4338 ("Engine" text,"Horsepower" text,"Torque" text,"Carburetor" text,"Compression Ratio" text,"Bore & Stroke" text,"VIN Code" text) | SELECT "Horsepower" FROM table_4338 WHERE "VIN Code" = 'h' AND "Engine" = '351-2v cleveland v8' |
What is the status for the monarch Mingyinyo? | CREATE TABLE table_26460435_7 (status VARCHAR,monarch VARCHAR) | SELECT status FROM table_26460435_7 WHERE monarch = "Mingyinyo" |
Which Power has a Name of 9 ad? | CREATE TABLE table_name_25 (power VARCHAR,name VARCHAR) | SELECT power FROM table_name_25 WHERE name = "9 ad" |
What is the Hangul of the Province with a Kana of ? | CREATE TABLE table_name_48 (hangul VARCHAR,kana VARCHAR) | SELECT hangul FROM table_name_48 WHERE kana = "へいあんなんどう" |
What is the party affiliation for President Stefano Baccelli? | CREATE TABLE table_name_33 (party VARCHAR,president VARCHAR) | SELECT party FROM table_name_33 WHERE president = "stefano baccelli" |
until 2104, how many patients with patent ductus arteriosus were diagnosed within 2 months after being diagnosed with lack of coordination? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREA... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'patent ductus arte... |
How many attempts did Charley Johnson have? | CREATE TABLE table_23998 ("Name" text,"Completions" real,"Attempts" real,"Completion %" text,"Yards" real,"Touchdowns" real,"Interceptions" real,"QB Rating" text) | SELECT COUNT("Attempts") FROM table_23998 WHERE "Name" = 'Charley Johnson' |
How many party were listed for district oklahoma 5? | CREATE TABLE table_18123 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Results" text,"Candidates" text) | SELECT COUNT("Party") FROM table_18123 WHERE "District" = 'Oklahoma 5' |
Recent questions from reputable users. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,O... | SELECT p.CreationDate, p.Id AS "post_link", p.AnswerCount, p.Tags FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE u.Reputation >= '##MinReputation##' AND p.PostTypeId = 1 AND p.Score >= 0 AND ClosedDate IS NULL ORDER BY p.CreationDate DESC LIMIT 500 |
How many silver for rank 22 when gold count was more than 0 and Bronze count was less than 5? | CREATE TABLE table_64196 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Silver") FROM table_64196 WHERE "Bronze" < '5' AND "Gold" > '0' AND "Rank" = '22' |
Calculate the number of private insurance patients who have had other closed (endoscopic) biopsy of biliary duct or sphincter of oddi. | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi" |
How many statuses are listed for Wayne county? | CREATE TABLE table_22815568_3 (status VARCHAR,county VARCHAR) | SELECT COUNT(status) FROM table_22815568_3 WHERE county = "Wayne" |
What is the name of the game whose team is Waterford and debuted later than 1995? | CREATE TABLE table_10741 ("Player" text,"Team" text,"Date" text,"Opposition" text,"Game" text,"D\u00e9but" real) | SELECT "Game" FROM table_10741 WHERE "Team" = 'waterford' AND "D\u00e9but" > '1995' |
What player has 14 wins? | CREATE TABLE table_name_83 (player VARCHAR,wins VARCHAR) | SELECT player FROM table_name_83 WHERE wins = 14 |
What are the names of the songs whose rating is below the rating of all songs in English? | CREATE TABLE files (f_id number,artist_name text,file_size text,duration text,formats text)CREATE TABLE genre (g_name text,rating text,most_popular_in text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genre_is text,rating number,languages text,releasedate time,resolution number)CREATE TAB... | SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') |
count the number of patients who have had transitional epithelial cells lab test. | 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 diagnoses (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 lab.label = "Transitional Epithelial Cells" |
What is the national share of the country whose area is 148064 km^2? | CREATE TABLE table_1630 ("Rank" real,"Administrative Division" text,"Area (km\u00b2)" real,"Area (sq mi)" real,"National Share (%)" text,"Comparable Country" text) | SELECT "National Share (%)" FROM table_1630 WHERE "Area (km\u00b2)" = '148064' |
Name the nationality of the player with round more than 4 | CREATE TABLE table_name_46 (nationality VARCHAR,round INTEGER) | SELECT nationality FROM table_name_46 WHERE round > 4 |
What year resulted in 54 laps? | CREATE TABLE table_name_39 (year VARCHAR,laps VARCHAR) | SELECT year FROM table_name_39 WHERE laps = 54 |
A scatter chart shows the correlation between Team_ID and ACC_Percent , and group by attribute ACC_Regular_Season. | 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 Team_ID, ACC_Percent FROM basketball_match GROUP BY ACC_Regular_Season |
What is the nature of the incident that's a bomb attack? | CREATE TABLE table_68827 ("Date" text,"Location" text,"Nature of incident" text,"Circumstances" text,"Casualties" text) | SELECT "Nature of incident" FROM table_68827 WHERE "Circumstances" = 'bomb attack' |
What province has a v valpara so region and an area of 927.2? | CREATE TABLE table_name_31 (province VARCHAR,region VARCHAR,area VARCHAR) | SELECT province FROM table_name_31 WHERE region = "v valparaíso" AND area = 927.2 |
count the number of patients who have received a coronar arteriogr-2 cath treatment in this year. | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name 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 chartevents (row_id n... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'coronar arteriogr-2 cath') AND DATETIME(procedures_i... |
What is the score for Set 1 at 19:21? | CREATE TABLE table_name_59 (score VARCHAR,set_1 VARCHAR) | SELECT score FROM table_name_59 WHERE set_1 = "19:21" |
What is Mark, when Lane is less than 5, and when React is 0.217? | CREATE TABLE table_name_88 (mark VARCHAR,lane VARCHAR,react VARCHAR) | SELECT mark FROM table_name_88 WHERE lane < 5 AND react = 0.217 |
What is the voltage iinput [V/A] of the whr-g54s model? | CREATE TABLE table_name_89 (voltage_input_ VARCHAR,v_a VARCHAR,model VARCHAR) | SELECT voltage_input_ AS "v_a" FROM table_name_89 WHERE model = "whr-g54s" |
What was the time of the bout against Dave Menne? | CREATE TABLE table_name_33 (time VARCHAR,opponent VARCHAR) | SELECT time FROM table_name_33 WHERE opponent = "dave menne" |
what is the monthly average of arterial bp [diastolic] for patient 13528 in the first hospital visit? | 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 text,language text,marital_status text,ethnicity text,age number)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icus... | SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13528 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevent... |
total number of wins | CREATE TABLE table_203_648 (id number,"date" text,"opposition" text,"result" text,"score" text,"brazil scorers" text,"competition" text) | SELECT COUNT(*) FROM table_203_648 WHERE "result" = 'w' |
Album # of 3rd is what chinese title? | CREATE TABLE table_36119 ("Album#" text,"English title" text,"Chinese title" text,"Released" text,"Label" text) | SELECT "Chinese title" FROM table_36119 WHERE "Album#" = '3rd' |
What date did the episode with a weekly ranking of 14 air? | CREATE TABLE table_70458 ("Episode No." real,"Airdate" text,"Total Viewers" real,"Share" text,"BBC One Weekly Ranking" real) | SELECT "Airdate" FROM table_70458 WHERE "BBC One Weekly Ranking" = '14' |
How many appelations are in Napa Country? | CREATE TABLE APPELLATIONS (County VARCHAR) | SELECT COUNT(*) FROM APPELLATIONS WHERE County = "Napa" |
Which artist has a draw greater than 15? | CREATE TABLE table_name_58 (artist VARCHAR,draw INTEGER) | SELECT artist FROM table_name_58 WHERE draw > 15 |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the average of price , and group by attribute founder. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder |
Find All_Road and All_Games_Percent , and visualize them by a bar chart, display bar in asc order please. | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce... | SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Road |
How many million viewers watched episodes prior to episode 2.0? | CREATE TABLE table_27927185_1 (viewers__millions_ VARCHAR,episode__number INTEGER) | SELECT viewers__millions_ FROM table_27927185_1 WHERE episode__number < 2.0 |
Score of 4 6, 6 4, 6 4 included which tournament? | CREATE TABLE table_5133 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the Final" text,"Score" text) | SELECT "Tournament" FROM table_5133 WHERE "Score" = '4–6, 6–4, 6–4' |
When the attendance was 3188 what was the score? | CREATE TABLE table_50435 ("Date" text,"Home" text,"Score" text,"Away" text,"Attendance" real) | SELECT "Score" FROM table_50435 WHERE "Attendance" = '3188' |
what is the name when the west or south terminus is ne 112 west of blue springs? | CREATE TABLE table_name_63 (name VARCHAR,west_or_south_terminus VARCHAR) | SELECT name FROM table_name_63 WHERE west_or_south_terminus = "ne 112 west of blue springs" |
What was their record on Wed. Dec. 5, when they played in Boston Garden? | CREATE TABLE table_name_11 (record VARCHAR,location VARCHAR,date VARCHAR) | SELECT record FROM table_name_11 WHERE location = "boston garden" AND date = "wed. dec. 5" |
Average Questions Per Users Which Have Posted At Least One Question. | 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 COUNT(Ids) AS Questioners, SUM(PostCount) AS Questions, (SUM(PostCount) / 1.0) / (COUNT(Ids) / 1.0) AS QsPerPoster FROM (SELECT p.OwnerUserId AS Ids, COUNT(p.Id) AS PostCount FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.PostTypeId = 1 GROUP BY p.OwnerUserId) AS q |
What is Date, when Location Attendance is 'TD Banknorth Garden 18,624'? | CREATE TABLE table_76590 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Date" FROM table_76590 WHERE "Location Attendance" = 'td banknorth garden 18,624' |
earliest still available date for a tag to show up. | CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Pen... | SELECT CreationDate, Text, PostHistoryTypeId, UserId AS "user10926745", PostId AS "post_link" FROM PostHistory WHERE PostHistoryTypeId IN (3, 6, 9) AND Text LIKE '%<drupal>%' ORDER BY CreationDate |
Number of suggested edit votes in the last year. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE Tags (Id number,TagName text,Count number,Excer... | SELECT COUNT(*) FROM SuggestedEditVotes WHERE CreationDate > DATEADD(year, -1, GETDATE()) AND UserId > -1 |
what is the maximum total cost of the hospital, which includes the laboratory pressure control test until 2102? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsyste... | 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 = 'pressure control')) AND STRFTIME('%y', cost.chargetime) <= '2102' GR... |
Top 100 Answers by Tag Name. | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE Votes (Id number,PostId numb... | SELECT q.Id, a.Id, a.Score, q.Tags, u.DisplayName FROM Posts AS q JOIN Posts AS a ON q.AcceptedAnswerId = a.Id JOIN Users AS u ON a.OwnerUserId = u.Id WHERE 0 = 0 AND q.Tags LIKE '%api%' AND q.PostTypeId = 1 AND a.PostTypeId = 2 ORDER BY a.Score DESC LIMIT 100 |
What position does the winner from Ohio State with 412 points play? | CREATE TABLE table_name_38 (position VARCHAR,school VARCHAR,points VARCHAR) | SELECT position FROM table_name_38 WHERE school = "ohio state" AND points = "412" |
What was the 2nd leg score having an aggregate score of 4-2? | CREATE TABLE table_name_88 (aggregate VARCHAR) | SELECT 2 AS nd_leg FROM table_name_88 WHERE aggregate = "4-2" |
Who were the governors of the parties associated with delegates from district 1, and count them by a bar chart | CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text,Party int,First_Elected real,Committee text)CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroller text,Attorney_General text,US_Senate text)CREATE TABLE county (County_Id int,Co... | SELECT Governor, COUNT(Governor) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor |
Return the names and ids of customers who have TN in their address Show bar chart, and show bar in descending order. | CREATE TABLE Department_Stores (dept_store_id INTEGER,dept_store_chain_id INTEGER,store_name VARCHAR(80),store_address VARCHAR(255),store_phone VARCHAR(80),store_email VARCHAR(80))CREATE TABLE Customer_Addresses (customer_id INTEGER,address_id INTEGER,date_from DATETIME,date_to DATETIME)CREATE TABLE Products (product_i... | SELECT customer_name, customer_id FROM Customers WHERE customer_address LIKE "%TN%" ORDER BY customer_name DESC |
give me the number of patients who underwent procedure with short tilte cardiac rhythm conv nec and were left against medical advice. | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND procedures.short_title = "Cardiac rhythm conv NEC" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.