instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Name the commissioned-decommissioned for NVR page of aor-7 | CREATE TABLE table_37189 ("Ship" text,"Hull No." text,"Builder" text,"Home Port" text,"Commissioned\u2013 Decommissioned" text,"NVR page" text) | SELECT "Commissioned\u2013 Decommissioned" FROM table_37189 WHERE "NVR page" = 'aor-7' |
What is the community with a wind power of 1042? | CREATE TABLE table_13566548_1 (autonomous_community VARCHAR,wind_power VARCHAR) | SELECT autonomous_community FROM table_13566548_1 WHERE wind_power = 1042 |
What home score has an Away team of fitzroy? | CREATE TABLE table_51920 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Date" text) | SELECT "Home team score" FROM table_51920 WHERE "Away team" = 'fitzroy' |
When were the boston bruins the home team? | CREATE TABLE table_name_95 (date VARCHAR,home VARCHAR) | SELECT date FROM table_name_95 WHERE home = "boston bruins" |
what are the number of titles that premiered in the month of september ? | CREATE TABLE table_203_501 (id number,"title" text,"genre" text,"sub\u00addivisions" text,"libretto" text,"premiere date" text,"place,theatre" text) | SELECT COUNT(DISTINCT "title") FROM table_203_501 WHERE "premiere date" = 9 |
What was the loss when the record was 46-59? | CREATE TABLE table_36628 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Loss" FROM table_36628 WHERE "Record" = '46-59' |
Questions per day of week. | CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)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,LastEdi... | SELECT TIME_TO_STR(CreationDate, '%W'), COUNT(1) FROM Posts WHERE PostTypeId = 1 GROUP BY TIME_TO_STR(CreationDate, '%W') |
What is the arrangement for bets3ab 3alia nafsy? | CREATE TABLE table_28005100_1 (arrangement VARCHAR,title VARCHAR) | SELECT arrangement FROM table_28005100_1 WHERE title = "Bets3ab 3alia Nafsy" |
What is the hometown of the player who attended Ohio State? | CREATE TABLE table_name_35 (hometown VARCHAR,college VARCHAR) | SELECT hometown FROM table_name_35 WHERE college = "ohio state" |
Which driver won the Phillip Island Grand Prix Circuit? | CREATE TABLE table_78253 ("Race Title" text,"Circuit" text,"City / State" text,"Date" text,"Winner" text,"Team" text) | SELECT "Winner" FROM table_78253 WHERE "Circuit" = 'phillip island grand prix circuit' |
Which song lasts 4:08? | CREATE TABLE table_63571 ("Song" text,"Performer" text,"Original artist" text,"Length" text,"Recorded" text) | SELECT "Song" FROM table_63571 WHERE "Length" = '4:08' |
Which Against has Losses smaller than 5, and a Wimmera FL of warrack eagles, and Draws smaller than 0? | CREATE TABLE table_name_68 (against INTEGER,draws VARCHAR,losses VARCHAR,wimmera_fl VARCHAR) | SELECT AVG(against) FROM table_name_68 WHERE losses < 5 AND wimmera_fl = "warrack eagles" AND draws < 0 |
What Catalog released on June 29, 1999 has a Digipak Album Format? | CREATE TABLE table_name_8 (catalog VARCHAR,format VARCHAR,date VARCHAR) | SELECT catalog FROM table_name_8 WHERE format = "digipak album" AND date = "june 29, 1999" |
Who wrote the lyrics for Mukti? | CREATE TABLE table_name_14 (lyricist VARCHAR,film VARCHAR) | SELECT lyricist FROM table_name_14 WHERE film = "mukti" |
What was the date of death entry in the row that has a date of inauguration entry of date of inauguration? | CREATE TABLE table_65805 ("President" text,"Date of birth" text,"Date of inauguration" text,"Age at inauguration" text,"End of term" text,"Length of retirement" text,"Date of death" text,"Lifespan" text) | SELECT "Date of death" FROM table_65805 WHERE "Date of inauguration" = 'date of inauguration' |
What is the attendance when oadby town is away? | CREATE TABLE table_name_37 (attendance VARCHAR,away_team VARCHAR) | SELECT attendance FROM table_name_37 WHERE away_team = "oadby town" |
How many bookings does each booking status have? List the booking status code and the number of corresponding bookings. Show a pie chart. | CREATE TABLE Apartments (apt_id INTEGER,building_id INTEGER,apt_type_code CHAR(15),apt_number CHAR(10),bathroom_count INTEGER,bedroom_count INTEGER,room_count CHAR(5))CREATE TABLE Apartment_Bookings (apt_booking_id INTEGER,apt_id INTEGER,guest_id INTEGER,booking_status_code CHAR(15),booking_start_date DATETIME,booking_... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code |
What is the party affiliation for senator mark Wagoner? | CREATE TABLE table_3474 ("District" real,"Senator" text,"Party" text,"Residence" text,"First elected" text,"Term Limited" real) | SELECT "Party" FROM table_3474 WHERE "Senator" = 'Mark Wagoner' |
What is the Loco Nos of the e3 class? | CREATE TABLE table_56087 ("Class" text,"Wheels" text,"Date" text,"No. built" real,"Loco Nos." text,"Comments" text) | SELECT "Loco Nos." FROM table_56087 WHERE "Class" = 'e3' |
Between EECS 519 and EECS 537 , which is easier ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE requirement (requirement_id int,requirement var... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 519 OR course.number = 537) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... |
what was the last height of patient 17398 until 16 months ago. | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text... | SELECT 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 = 17398)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... |
Tell me the pitcher on september 6, 2006 | CREATE TABLE table_54622 ("Pitcher" text,"Date" text,"Team" text,"Result" text,"Site" text) | SELECT "Pitcher" FROM table_54622 WHERE "Date" = 'september 6, 2006' |
Matches larger than 5 is the sum of what position? | CREATE TABLE table_name_67 (pos INTEGER,matches INTEGER) | SELECT SUM(pos) FROM table_name_67 WHERE matches > 5 |
Return a bar chart about the distribution of All_Road and School_ID . | 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 All_Road, School_ID FROM basketball_match |
Frequency MHz of 88.7 had what average erp w? | CREATE TABLE table_name_50 (erp_w INTEGER,frequency_mhz VARCHAR) | SELECT AVG(erp_w) FROM table_name_50 WHERE frequency_mhz = 88.7 |
What year was the name mount roskill grammar school? | CREATE TABLE table_51259 ("Name" text,"Years" text,"Gender" text,"Local board" text,"Suburb" text,"Authority" text,"Decile" text,"Roll" real) | SELECT "Years" FROM table_51259 WHERE "Name" = 'mount roskill grammar school' |
What district is nick lampson from? | CREATE TABLE table_1341453_45 (district VARCHAR,incumbent VARCHAR) | SELECT district FROM table_1341453_45 WHERE incumbent = "Nick Lampson" |
On all other parties the National option polls are at 1.3% where as the opinion research pole is at what percentage? | CREATE TABLE table_20444 ("Party" text,"Marplan" text,"Gallup" text,"National Opinion Polls (NOP)" text,"Opinion Research Centre (OPC)" text,"Harris" text) | SELECT "Opinion Research Centre (OPC)" FROM table_20444 WHERE "National Opinion Polls (NOP)" = '1.3%' |
What is the lowest position for driver Kyle Busch? | CREATE TABLE table_35211 ("Pos." real,"Car #" real,"Driver" text,"Make" text,"Team" text) | SELECT MIN("Pos.") FROM table_35211 WHERE "Driver" = 'kyle busch' |
Find the average room count of the apartments that have the 'Studio' type code. | CREATE TABLE apartment_facilities (apt_id number,facility_code text)CREATE TABLE apartment_bookings (apt_booking_id number,apt_id number,guest_id number,booking_status_code text,booking_start_date time,booking_end_date time)CREATE TABLE guests (guest_id number,gender_code text,guest_first_name text,guest_last_name text... | SELECT AVG(room_count) FROM apartments WHERE apt_type_code = "Studio" |
What is the result of the game with 68,436 attending? | CREATE TABLE table_54859 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Kickoff Time" text,"Attendance" text) | SELECT "Result" FROM table_54859 WHERE "Attendance" = '68,436' |
Name the Place which has a Score of 67-71=138, united states? | CREATE TABLE table_name_17 (place VARCHAR,country VARCHAR,score VARCHAR) | SELECT place FROM table_name_17 WHERE country = "united states" AND score = 67 - 71 = 138 |
how many times did patient 31854 in 12/2105 receive br milk fs po? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,ro... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'br milk fs p... |
What did the team score while away in moorabbin oval? | CREATE TABLE table_57439 ("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_57439 WHERE "Venue" = 'moorabbin oval' |
what 's the earliest flight from BOSTON to PHILADELPHIA | CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,e... | 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 = 'PHILAD... |
With more than 1 Gold and Silver and Total Sport, what is the Total? | CREATE TABLE table_55383 ("Sport" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Total") FROM table_55383 WHERE "Silver" > '1' AND "Sport" = 'total' AND "Gold" > '1' |
When was the score 3-6 4-6? | CREATE TABLE table_66426 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Date" FROM table_66426 WHERE "Score" = '3-6 4-6' |
why can't ya'll just have a good api. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Review... | SELECT COUNT(Id), Tags, RIGHT(LEFT(CreationDate, 11), 4) AS year, LEFT(CreationDate, 3) AS month FROM Posts GROUP BY Tags, RIGHT(LEFT(CreationDate, 11), 4), LEFT(CreationDate, 3) HAVING COUNT(Id) > 5 ORDER BY COUNT(Id) DESC |
Name the Non-Suited Match that has greater than 6 Number of Decks. | CREATE TABLE table_34655 ("Number of Decks" real,"Non-Suited Match" text,"Double Non-Suited Match" text,"Suited Match" text,"Suited + Non-Suited Match" text,"Double Suited Match" text,"House Edge" text) | SELECT "Non-Suited Match" FROM table_34655 WHERE "Number of Decks" > '6' |
what are the total number of wins for tom boonen overall ? | CREATE TABLE table_204_4 (id number,"date" text,"race" text,"competition" text,"rider" text,"country" text,"location" text) | SELECT COUNT(*) FROM table_204_4 WHERE "rider" = 'tom boonen' |
had patient 2700 been to er until 2104? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 2700 AND admissions.admission_location = 'emergency room admit' AND STRFTIME('%y', admissions.admittime) <= '2104' |
Name the birth date for shirt number 7 | CREATE TABLE table_19308 ("Shirt No" real,"Nationality" text,"Player" text,"Birth Date" text,"Height" real,"Position" text) | SELECT "Birth Date" FROM table_19308 WHERE "Shirt No" = '7' |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, and sort by the Y-axis in desc please. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) DESC |
When Audra Lynn was featured in Week 2, who was the cyber girl for Week 5? | CREATE TABLE table_name_36 (week_5 VARCHAR,week_2 VARCHAR) | SELECT week_5 FROM table_name_36 WHERE week_2 = "audra lynn" |
What is the lowest grid with time of +0.499,when laps are larger than 21? | CREATE TABLE table_46291 ("Rider" text,"Manufacturer" text,"Laps" real,"Time" text,"Grid" real) | SELECT MIN("Grid") FROM table_46291 WHERE "Time" = '+0.499' AND "Laps" > '21' |
What city has trojans as the team, and taylor as the school? | CREATE TABLE table_name_43 (city VARCHAR,team VARCHAR,school VARCHAR) | SELECT city FROM table_name_43 WHERE team = "trojans" AND school = "taylor" |
what is the reported age when the reported birth date is 22 december 1878? | CREATE TABLE table_44410 ("Region" text,"Name" text,"Reported birth date" text,"Reported death date" text,"Reported age" text) | SELECT "Reported age" FROM table_44410 WHERE "Reported birth date" = '22 december 1878' |
Find the 'date became customers' of the customers whose ID is between 10 and 20. | CREATE TABLE products (product_id number,product_details text)CREATE TABLE customer_contact_channels (customer_id number,channel_code text,active_from_date time,active_to_date time,contact_number text)CREATE TABLE customers (customer_id number,payment_method text,customer_name text,date_became_customer time,other_custo... | SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 |
What reference, written by Nelson Riddle, suggests 2 violas? | CREATE TABLE table_26622 ("Reference" text,"Author" text,"Section Size" text,"Violins" real,"Violas" real,"Celli" real,"Basses" real) | SELECT "Reference" FROM table_26622 WHERE "Violas" = '2' AND "Author" = 'Nelson Riddle' |
What's the total number of points when the vancouver burrards have fewer than 9 losses and more than 24 games? | CREATE TABLE table_name_18 (points VARCHAR,team_name VARCHAR,losses VARCHAR,games VARCHAR) | SELECT COUNT(points) FROM table_name_18 WHERE losses < 9 AND games > 24 AND team_name = "vancouver burrards" |
Where did a home team score 9.9 (63)? | CREATE TABLE table_32315 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_32315 WHERE "Home team score" = '9.9 (63)' |
How many entries are there for Class for the player Everett Sweeley? | CREATE TABLE table_1006 ("Player" text,"Position" text,"Games started" text,"Hometown" text,"Height" text,"Weight" real,"Class" text,"Prior experience" text) | SELECT COUNT("Class") FROM table_1006 WHERE "Player" = 'Everett Sweeley' |
what two peaks are taller than dumlong ? | CREATE TABLE table_203_808 (id number,"rank" number,"peak name" text,"elevation" text,"location" text,"notes" text) | SELECT "peak name" FROM table_203_808 WHERE "elevation" > (SELECT "elevation" FROM table_203_808 WHERE "peak name" = 'dumlong') |
Who wrote the series number 49 with a season larger than 4? | CREATE TABLE table_52670 ("Series no." real,"Season no." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production Code" real) | SELECT "Written by" FROM table_52670 WHERE "Season no." > '4' AND "Series no." = '49' |
What is the 1991 population for the urban settlement named Ba ki Jarak? | CREATE TABLE table_27849 ("Urban settlement" text,"Cyrillic Name" text,"City / municipality" text,"District" text,"Population (1991)" real,"Population (2002)" real,"Population (2011)" real) | SELECT "Population (1991)" FROM table_27849 WHERE "Urban settlement" = 'Bački Jarak' |
What is the frequency of the Classic Country Krki-fm booster station? | CREATE TABLE table_134987_3 (frequency VARCHAR,format VARCHAR) | SELECT frequency FROM table_134987_3 WHERE format = "Classic Country KRKI-FM booster" |
Give me the comparison about the amount of Nationality over the Nationality , and group by attribute Nationality, could you list by the y axis in ascending? | CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te... | SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY COUNT(Nationality) |
What venue had an away team of south melbourne? | CREATE TABLE table_name_32 (venue VARCHAR,away_team VARCHAR) | SELECT venue FROM table_name_32 WHERE away_team = "south melbourne" |
count the number of patients whose primary disease is s/p fall and year of death is less than or equal to 2164? | 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 WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2164.0" |
Just how badly are W3Schools answers treated?. | 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 Posts.Id AS "post_link", COUNT(Upvotes.Id) AS UpvoteCount, COUNT(Downvotes.Id) AS DownvoteCount FROM Posts LEFT JOIN Votes AS Upvotes ON Upvotes.PostId = Posts.Id LEFT JOIN Votes AS Downvotes ON Downvotes.PostId = Posts.Id WHERE Upvotes.VoteTypeId = 2 AND Downvotes.VoteTypeId = 3 AND Posts.PostTypeId = 2 AND Pos... |
Draw a bar chart of date moved in versus how many date moved in, and sort in asc by the y axis. | CREATE TABLE Organizations (organization_id INTEGER,parent_organization_id INTEGER,organization_details VARCHAR(255))CREATE TABLE Residents (resident_id INTEGER,property_id INTEGER,date_moved_in DATETIME,date_moved_out DATETIME,other_details VARCHAR(255))CREATE TABLE Properties (property_id INTEGER,property_type_code C... | SELECT date_moved_in, COUNT(date_moved_in) FROM Customer_Events GROUP BY date_moved_in ORDER BY COUNT(date_moved_in) |
What novelty has USA as the location, and coryloides as the name? | CREATE TABLE table_name_70 (novelty VARCHAR,location VARCHAR,name VARCHAR) | SELECT novelty FROM table_name_70 WHERE location = "usa" AND name = "coryloides" |
Who is the together we can do more when democratic coalition is ren alinco ( ppd )? | CREATE TABLE table_28763 ("Dist." real,"Democratic Coalition" text,"Alliance" text,"Together We Can Do More" text,"Independent Regional Force" text,"Independents" text) | SELECT "Together We Can Do More" FROM table_28763 WHERE "Democratic Coalition" = 'René Alinco ( PPD )' |
What is the total number of Year of Intro(s), when Country of Origin is Soviet Union, when Type is Reusable, when Primary Cartridge is 40mm, and when Name/ Designation is RPG-29? | CREATE TABLE table_7704 ("Name/ designation" text,"Year of intro" real,"Country of origin" text,"Primary cartridge" text,"Type" text) | SELECT COUNT("Year of intro") FROM table_7704 WHERE "Country of origin" = 'soviet union' AND "Type" = 'reusable' AND "Primary cartridge" = '40mm' AND "Name/ designation" = 'rpg-29' |
What is the minimum capacity for Sangre Grande Ground? | CREATE TABLE table_24039173_1 (capacity INTEGER,stadium VARCHAR) | SELECT MIN(capacity) FROM table_24039173_1 WHERE stadium = "Sangre Grande Ground" |
How many features did Adam Carroll win 6 times when the start was larger than 32? | CREATE TABLE table_41758 ("Driver" text,"Wins" real,"Starts" real,"Sprint" real,"Feature" real) | SELECT COUNT("Feature") FROM table_41758 WHERE "Wins" = '6' AND "Driver" = 'adam carroll' AND "Starts" > '32' |
What was the 2007 result in the 28th district? | CREATE TABLE table_13618584_1 (district VARCHAR) | SELECT 2007 AS _result FROM table_13618584_1 WHERE district = "28th" |
Visualize a bar chart for how many students are in each department?, and show in ascending by the Y. | CREATE TABLE prereq (course_id varchar(8),prereq_id varchar(8))CREATE TABLE department (dept_name varchar(20),building varchar(15),budget numeric(12,2))CREATE TABLE advisor (s_ID varchar(5),i_ID varchar(5))CREATE TABLE section (course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0),building varcha... | SELECT dept_name, COUNT(*) FROM student GROUP BY dept_name ORDER BY COUNT(*) |
What is the season number of the episode directed by Donald Crombie and the series number is 40? | CREATE TABLE table_16175064_3 (season__number VARCHAR,director_s_ VARCHAR,series__number VARCHAR) | SELECT season__number FROM table_16175064_3 WHERE director_s_ = "Donald Crombie" AND series__number = 40 |
What is the sitalsasthi carnival with hirakud as sambalpuri saree? | CREATE TABLE table_76560 ("Sambalpuri Cinema" text,"Kosal" text,"Western Odisha" text,"Sitalsasthi Carnival" text,"Sambalpuri Language" text,"Sambalpuri Saree" text) | SELECT "Sitalsasthi Carnival" FROM table_76560 WHERE "Sambalpuri Saree" = 'hirakud' |
Tag synonyms where both tags have some questions. As far as I can tell, this happens when the tags were synonymized without merging | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE CloseRea... | SELECT ts.SourceTagName AS "tags", t1.Count, ts.TargetTagName AS "tags", t2.Count, ts.CreationDate, ts.OwnerUserId AS "user_link", ts.ApprovalDate, ts.ApprovedByUserId AS "user_link" FROM TagSynonyms AS ts INNER JOIN Tags AS t1 ON ts.SourceTagName = t1.TagName INNER JOIN Tags AS t2 ON ts.TargetTagName = t2.TagName WHER... |
Who was the winner in the Indian Wells? | CREATE TABLE table_name_67 (winner VARCHAR,tournament VARCHAR) | SELECT winner FROM table_name_67 WHERE tournament = "indian wells" |
how many more total medals did china win over japan ? | CREATE TABLE table_204_320 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT (SELECT "total" FROM table_204_320 WHERE "nation" = 'china') - (SELECT "total" FROM table_204_320 WHERE "nation" = 'japan') |
What rank was the premier Sir John See? | CREATE TABLE table_64997 ("Rank:" real,"Premier:" text,"Party:" text,"Assumed Office:" text,"Left Office:" text,"TOTAL Time in Office:" text) | SELECT COUNT("Rank:") FROM table_64997 WHERE "Premier:" = 'sir john see' |
What is the smallest crowd at princes park? | CREATE TABLE table_name_57 (crowd INTEGER,venue VARCHAR) | SELECT MIN(crowd) FROM table_name_57 WHERE venue = "princes park" |
On December 25, what was the record? | CREATE TABLE table_8591 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Record" FROM table_8591 WHERE "Date" = 'december 25' |
give me the number of patients whose drug name is vitamin b complex? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Vitamin B Complex" |
Name the lowest against for when wins are greater than 14, draws is 0 and losses are 4 | CREATE TABLE table_58364 ("Mid Gippsland FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT MIN("Against") FROM table_58364 WHERE "Losses" = '4' AND "Draws" = '0' AND "Wins" > '14' |
What is Anna Khlistunova's Nationality? | CREATE TABLE table_name_20 (nationality VARCHAR,name VARCHAR) | SELECT nationality FROM table_name_20 WHERE name = "anna khlistunova" |
A bar chart about the number of faults for different fault status of all the faults recoreded in the logs, and rank by the x axis from low to high. | CREATE TABLE Asset_Parts (asset_id INTEGER,part_id INTEGER)CREATE TABLE Part_Faults (part_fault_id INTEGER,part_id INTEGER,fault_short_name VARCHAR(20),fault_description VARCHAR(255),other_fault_details VARCHAR(255))CREATE TABLE Engineer_Visits (engineer_visit_id INTEGER,contact_staff_id INTEGER,engineer_id INTEGER,fau... | SELECT fault_status, COUNT(fault_status) FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY fault_status ORDER BY fault_status |
On what surface was the match played with a score of 4 6, 6 3, 6 1? | CREATE TABLE table_name_82 (surface VARCHAR,score VARCHAR) | SELECT surface FROM table_name_82 WHERE score = "4–6, 6–3, 6–1" |
What is every rider on Monday August 24 at 21' 12.02 106.781mph? | CREATE TABLE table_23465864_5 (rider VARCHAR,mon_24_aug VARCHAR) | SELECT rider FROM table_23465864_5 WHERE mon_24_aug = "21' 12.02 106.781mph" |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of founder and the sum of revenue , and group by attribute founder. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder |
What is Gareth Morgan's Secondary Military Specialty? | CREATE TABLE table_name_21 (secondary_military_speciality VARCHAR,real_name VARCHAR) | SELECT secondary_military_speciality FROM table_name_21 WHERE real_name = "gareth morgan" |
What papers were published at CVPR in 2015 were about Semantic Segmentation ? | CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE field (fieldid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREA... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'Semantic Segmentation' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'CVPR' |
Draw a bar chart for what are the id and name of the mountains that have at least 2 photos?, sort by the bars in descending. | CREATE TABLE photos (id int,camera_lens_id int,mountain_id int,color text,name text)CREATE TABLE camera_lens (id int,brand text,name text,focal_length_mm real,max_aperture real)CREATE TABLE mountain (id int,name text,Height real,Prominence real,Range text,Country text) | SELECT T1.name, T1.id FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id ORDER BY T1.name DESC |
What to par has 66 as the score? | CREATE TABLE table_name_56 (to_par VARCHAR,score VARCHAR) | SELECT to_par FROM table_name_56 WHERE score = 66 |
patient 010-29520 was admitted since 2104 to the hospital? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,cultur... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '010-29520' AND STRFTIME('%y', patient.hospitaladmittime) >= '2104' |
what 's the first flight from BOSTON to SAN FRANCISCO | CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE compartment_class (compartment varc... | 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 = 'SAN FR... |
Where the mantra is 'o ya v yuve nama ', what is the direction of the guardian? | CREATE TABLE table_100518_1 (direction VARCHAR,mantra VARCHAR) | SELECT direction FROM table_100518_1 WHERE mantra = "Oṃ Yaṃ Vāyuve Namaḥ" |
what was the first generic output time for patient 007-9115 on the first icu visit? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean num... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-9115') AND NOT patient.unitdischargetime IS NULL ... |
count the number of patients whose admission location is emergency room admit and procedure short title is cardiac rhythm conv nec? | 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 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Cardiac rhythm conv NEC" |
What's the sum of Silver with total smaller than 560, a Bronze larger than 6, and a Gold of 3? | CREATE TABLE table_79483 ("Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Silver") FROM table_79483 WHERE "Total" < '560' AND "Bronze" > '6' AND "Gold" = '3' |
What is Edinburgh's airport's freight in metric tonnes? | CREATE TABLE table_13836704_7 (freight___metric_tonnes__ INTEGER,airport VARCHAR) | SELECT MAX(freight___metric_tonnes__) FROM table_13836704_7 WHERE airport = "Edinburgh" |
what is patient 012-66291's height for the first time in this month? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number... | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-66291') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', ... |
What is the Country of the Player with a To par of 5? | CREATE TABLE table_50704 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Country" FROM table_50704 WHERE "To par" = '–5' |
Name the Round that has Res of win and an Opponent of demian maia? | CREATE TABLE table_60087 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT SUM("Round") FROM table_60087 WHERE "Res." = 'win' AND "Opponent" = 'demian maia' |
Show the member name and hometown who registered a branch in 2016. | CREATE TABLE branch (branch_id number,name text,open_year text,address_road text,city text,membership_amount text)CREATE TABLE member (member_id number,card_number text,name text,hometown text,level number)CREATE TABLE membership_register_branch (member_id number,branch_id text,register_year text)CREATE TABLE purchase ... | SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016 |
What is Opponent In The Final, when Year is '1942'? | CREATE TABLE table_49078 ("Outcome" text,"Year" real,"Pro Slam Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Opponent in the final" FROM table_49078 WHERE "Year" = '1942' |
what was the name of the drug prescribed during the last hospital encounter to patient 002-56853 two times? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,ob... | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.