answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT country FROM table_name_19 WHERE rank = 79
What country is ranked 79?
CREATE TABLE table_name_19 ( country VARCHAR, rank VARCHAR )
SELECT bleeding_time FROM table_1555308_1 WHERE prothrombin_time = "Unaffected" AND platelet_count = "Unaffected"
What are all the possible bleeding time results where prothrombin time and platelet count are both unaffected?
CREATE TABLE table_1555308_1 (bleeding_time VARCHAR, prothrombin_time VARCHAR, platelet_count VARCHAR)
SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1
What is the most popular full name of the actors?
CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR)
SELECT "British Lee-Enfield (data for late model)" FROM table_49483 WHERE "Japanese Type 38 Rifle" = '5'
What is the British Lee-Enfield (data for late model) when the Japanese Type 38 Rifle is 5?
CREATE TABLE table_49483 ( "Rifle" text, "Danish Krag-J\u00f8rgensen 1889" text, "US Krag-J\u00f8rgensen M1892" text, "Norwegian Krag-J\u00f8rgensen M1894" text, "Japanese Type 38 Rifle" text, "German Gewehr 98" text, "British Lee-Enfield (data for late model)" text )
SELECT percentage_of_land_area FROM table_15555661_2 WHERE percentage_protected = "7.96"
What is the percentage of land area in the ecozone that the percentage protected is 7.96?
CREATE TABLE table_15555661_2 (percentage_of_land_area VARCHAR, percentage_protected VARCHAR)
SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2
Which districts have at least two addresses?
CREATE TABLE address (district VARCHAR)
SELECT "Years for Jazz" FROM table_52028 WHERE "School/Club Team" = 'houston'
What is the Year for Jazz club of Houston?
CREATE TABLE table_52028 ( "Player" text, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
SELECT percentage_of_total_area FROM table_15555661_2 WHERE percentage_of_land_area = "2.2"
What is the percentage of total area in the ecozone that the percentage of land area is 2.2?
CREATE TABLE table_15555661_2 (percentage_of_total_area VARCHAR, percentage_of_land_area VARCHAR)
SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'
What is the phone number and postal code of the address 1031 Daugavpils Parkway?
CREATE TABLE address (phone VARCHAR, postal_code VARCHAR, address VARCHAR)
SELECT Id AS "post_link", Tags, LastActivityDate FROM Posts WHERE Posts.Id IN (SELECT PostTags.PostId FROM PostTags INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Tags.TagName IN ('ggplot2', 'lattice', 'plyr', 'data.frame', 'sweave', 'lapply', 'sapply', 'r') GROUP BY PostTags.PostId HAVING COUNT(CASE WHEN Tags.TagNa...
Missing R tag in R related tag. Find posts without R tag, but with one of closely related tag
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostHistory ( Id number, Po...
SELECT percentage_of_total_area FROM table_15555661_2 WHERE percentage_protected = "8.06"
What is the percentage of total area in the ecozone that the percentage protected is 8.06?
CREATE TABLE table_15555661_2 (percentage_of_total_area VARCHAR, percentage_protected VARCHAR)
SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1
Which city has the most addresses? List the city name, number of addresses, and city id.
CREATE TABLE address (city_id VARCHAR); CREATE TABLE city (city VARCHAR, city_id VARCHAR)
SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1
What is detail of the student who most recently registered course?
CREATE TABLE addresses ( address_id number, line_1 text, line_2 text, city text, zip_postcode text, state_province_county text, country text ) CREATE TABLE people_addresses ( person_address_id number, person_id number, address_id number, date_from time, date_to time ) C...
SELECT percentage_of_land_area FROM table_15555661_2 WHERE percentage_protected = "15.28"
What is the percentage of land area in the ecozone that the percentage protected is 15.28?
CREATE TABLE table_15555661_2 (percentage_of_land_area VARCHAR, percentage_protected VARCHAR)
SELECT COUNT(*) FROM address WHERE district = 'California'
How many addresses are in the district of California?
CREATE TABLE address (district VARCHAR)
SELECT "nation" FROM table_204_822 WHERE "nation" <> 'bulgaria' AND "total" = (SELECT "total" FROM table_204_822 WHERE "nation" = 'bulgaria')
which country won the same amount of medals as bulgaria in these olympics ?
CREATE TABLE table_204_822 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT COUNT(area__km²_) FROM table_15555661_2 WHERE ecozone = "Boreal Shield"
How large is the Boreal Shield in km2?
CREATE TABLE table_15555661_2 (area__km²_ VARCHAR, ecozone VARCHAR)
SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3
Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.
CREATE TABLE film (title VARCHAR, film_id VARCHAR, rental_rate VARCHAR); CREATE TABLE inventory (film_id VARCHAR); CREATE TABLE film (title VARCHAR, film_id VARCHAR)
SELECT "title" FROM table_204_620 WHERE id = (SELECT id FROM table_204_620 WHERE "title" = 'dhol') - 1
what title is before dhol in 2007 ?
CREATE TABLE table_204_620 ( id number, "title" text, "year" number, "language" text, "role" text, "notes" text )
SELECT percentage_of_total_area FROM table_15555661_2 WHERE area__km²_ = 1782252
What is the percentage of total area in the ecozone that the area is 1782252 km2?
CREATE TABLE table_15555661_2 (percentage_of_total_area VARCHAR, area__km²_ VARCHAR)
SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
How many cities are in Australia?
CREATE TABLE country (country_id VARCHAR, country VARCHAR); CREATE TABLE city (country_id VARCHAR)
SELECT "Location" FROM table_19041 WHERE "Episode" = '12th Pride of Britain Awards'
Where was held the ceremony for the 12th Pride of Britain Awards?
CREATE TABLE table_19041 ( "Episode" text, "Original Air Date" text, "Viewers (millions)" text, "Presenter" text, "Location" text )
SELECT platelet_count FROM table_1557752_1 WHERE condition = "Hemophilia"
What is the condition of the platelet counts in hemophilia?
CREATE TABLE table_1557752_1 (platelet_count VARCHAR, condition VARCHAR)
SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3
Which countries have at least 3 cities?
CREATE TABLE country (country VARCHAR, country_id VARCHAR); CREATE TABLE city (country_id VARCHAR)
SELECT language FROM table_name_62 WHERE music_director = "raj kamal"
What language does Raj Kamal speak?
CREATE TABLE table_name_62 ( language VARCHAR, music_director VARCHAR )
SELECT prothrombin_time FROM table_1557752_1 WHERE condition = "Von Willebrand disease"
What is the prothrombin time in Von willebrand disease?
CREATE TABLE table_1557752_1 (prothrombin_time VARCHAR, condition VARCHAR)
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
CREATE TABLE payment (payment_date VARCHAR, staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, first_name VARCHAR); CREATE TABLE payment (payment_date VARCHAR, amount INTEGER)
SELECT "Venue" FROM table_76279 WHERE "Season" = '1963' AND "Date" = '17 november 1963'
What venue had an event on 17 November 1963?
CREATE TABLE table_76279 ( "Season" real, "Date" text, "Winner" text, "Score [C ]" text, "Venue" text, "Competition round" text )
SELECT prothrombin_time FROM table_1557752_1 WHERE partial_thromboplastin_time = "Prolonged" AND bleeding_time = "Prolonged"
If the partial thromboplastin and bleeding time is prolonged, what is the prothrombin time?
CREATE TABLE table_1557752_1 (prothrombin_time VARCHAR, partial_thromboplastin_time VARCHAR, bleeding_time VARCHAR)
SELECT COUNT(*) FROM customer WHERE active = '1'
How many customers have an active value of 1?
CREATE TABLE customer (active VARCHAR)
SELECT "Date" FROM table_66188 WHERE "Tournament" = 'ameritech senior open'
What is the Date of the Ameritech Senior Open?
CREATE TABLE table_66188 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT bleeding_time FROM table_1557752_1 WHERE condition = "Bernard-Soulier syndrome"
What is the bleeding time in Bernard-soulier syndrome?
CREATE TABLE table_1557752_1 (bleeding_time VARCHAR, condition VARCHAR)
SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
Which film has the highest rental rate? And what is the rate?
CREATE TABLE film (title VARCHAR, rental_rate VARCHAR)
SELECT COUNT(*) FROM Posts
select count (*) from Posts.
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswer...
SELECT ring_name FROM table_1557974_1 WHERE current_rank = "f0 Jūryō 3 West"
Which ring names are currently ranked f0 jūryō 3 west?
CREATE TABLE table_1557974_1 (ring_name VARCHAR, current_rank VARCHAR)
SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1
Which film has the most number of actors or actresses? List the film name, film id and description.
CREATE TABLE film_actor (film_id VARCHAR); CREATE TABLE film (title VARCHAR, film_id VARCHAR, description VARCHAR)
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of code , and group by attribute name, list by the total number in descending.
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 COUNT(career_and_other_notes) FROM table_1557974_1 WHERE birthplace = "Nara"
How many wrestlers were born in nara, and have a completed 'career and other notes' section?
CREATE TABLE table_1557974_1 (career_and_other_notes VARCHAR, birthplace VARCHAR)
SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1
Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR)
SELECT MAX("Red List") FROM table_67362 WHERE "Family" = 'muridae' AND "Species Authority" = 'microtus pinetorum (le conte, 1830)'
What is the highest Red List for the muridae family and species Authority of microtus pinetorum (le conte, 1830)?
CREATE TABLE table_67362 ( "Name" text, "Species Authority" text, "Order" text, "Family" text, "Red List" real )
SELECT debut FROM table_1557974_1 WHERE birthplace = "Nara"
What are the debut year for wrestlers born in Nara?
CREATE TABLE table_1557974_1 (debut VARCHAR, birthplace VARCHAR)
SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30
Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR)
SELECT "Elevator" FROM table_12911 WHERE "Title" = 'bishop of palestrina'
Which Elevator has a Title of bishop of palestrina?
CREATE TABLE table_12911 ( "Elector" text, "Nationality" text, "Order" text, "Title" text, "Elevated" text, "Elevator" text )
SELECT birthplace FROM table_1557974_1 WHERE debut = "2002-7"
Where were the wrestlers born who debuted in 2002-7?
CREATE TABLE table_1557974_1 (birthplace VARCHAR, debut VARCHAR)
SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
Which store owns most items?
CREATE TABLE inventory (store_id VARCHAR)
SELECT brand, COUNT(brand) FROM camera_lens GROUP BY brand ORDER BY brand DESC
Group and count brand for each camera lens using a bar chart, and rank X in descending order.
CREATE TABLE photos ( id int, camera_lens_id int, mountain_id int, color text, name text ) CREATE TABLE mountain ( id int, name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE camera_lens ( id int, brand text, name text, focal_len...
SELECT career_and_other_notes FROM table_1557974_1 WHERE stable = "Oguruma"
What are the career and other notes for wrestlers whose stable is oguruma?
CREATE TABLE table_1557974_1 (career_and_other_notes VARCHAR, stable VARCHAR)
SELECT SUM(amount) FROM payment
What is the total amount of all payments?
CREATE TABLE payment (amount INTEGER)
SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM Person WHERE gender = 'male')
Who is the youngest male?
CREATE TABLE Person ( name VARCHAR, gender VARCHAR, age INTEGER ) CREATE TABLE person ( name VARCHAR, gender VARCHAR, age INTEGER )
SELECT kinship FROM table_15568886_14 WHERE proto_malayo_polynesian = "*t-ina"
Name the kinship for *t-ina
CREATE TABLE table_15568886_14 (kinship VARCHAR, proto_malayo_polynesian VARCHAR)
SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) LIMIT 1
Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.
CREATE TABLE payment (customer_id VARCHAR); CREATE TABLE customer (first_name VARCHAR, last_name VARCHAR, customer_id VARCHAR)
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 366) AND microbiologyevents.spec_type_desc = 'mrsa screen' AND DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIME(), '-1 year')
did patient 366 have microbiological test results from the mrsa screen until 1 year ago?
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, char...
SELECT COUNT(proto_austronesian) FROM table_15568886_14 WHERE proto_oceanic = "*natu"
Name the number of proto austronesian for *natu
CREATE TABLE table_15568886_14 (proto_austronesian VARCHAR, proto_oceanic VARCHAR)
SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
What is the genre name of the film HUNGER ROOF?
CREATE TABLE film_category (category_id VARCHAR, film_id VARCHAR); CREATE TABLE film (film_id VARCHAR, title VARCHAR); CREATE TABLE category (name VARCHAR, category_id VARCHAR)
SELECT Founder, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY AVG(Manufacturer)
For those records from the products and each product's manufacturer, find founder and the average of manufacturer , and group by attribute founder, and visualize them by a bar chart, I want to sort by the Y-axis in asc.
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 proto_austronesian FROM table_15568886_14 WHERE kinship = "father"
Name the ptor-austronesian for father
CREATE TABLE table_15568886_14 (proto_austronesian VARCHAR, kinship VARCHAR)
SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
How many films are there in each category? List the genre name, genre id and the count.
CREATE TABLE film_category (category_id VARCHAR); CREATE TABLE category (name VARCHAR, category_id VARCHAR)
SELECT MAX("Place") FROM table_5943 WHERE "Artist" = 'nikolas metaxas' AND "Televote" > '60'
Which Place is the highest one that has an Artist of nikolas metaxas, and a Televote larger than 60?
CREATE TABLE table_5943 ( "Draw" real, "Artist" text, "Song" text, "Jury" real, "Televote" real, "Total" real, "Place" real )
SELECT proto_oceanic FROM table_15568886_14 WHERE proto_polynesian = "*fafine"
Name the proto oceanic for *fafine
CREATE TABLE table_15568886_14 (proto_oceanic VARCHAR, proto_polynesian VARCHAR)
SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1
Which film has the most copies in the inventory? List both title and id.
CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (film_id VARCHAR)
SELECT name FROM table_name_65 WHERE constituency_number = "108"
What's the name of Constituency number 108?
CREATE TABLE table_name_65 ( name VARCHAR, constituency_number VARCHAR )
SELECT proto_austronesian FROM table_15568886_14 WHERE proto_oceanic = "*pine, *papine"
Name the proto-austrronesian for *pine, *papine
CREATE TABLE table_15568886_14 (proto_austronesian VARCHAR, proto_oceanic VARCHAR)
SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1
What is the film title and inventory id of the item in the inventory which was rented most frequently?
CREATE TABLE film (title VARCHAR, film_id VARCHAR); CREATE TABLE inventory (inventory_id VARCHAR, film_id VARCHAR); CREATE TABLE rental (inventory_id VARCHAR)
SELECT AVG("Rd #") FROM table_54910 WHERE "Player" = 'steve hazlett' AND "Pl GP" < '0'
When Steve Hazlett is the Player, and the PI GP is under 0, what is the average Rd #?
CREATE TABLE table_54910 ( "Rd #" real, "Pick #" real, "Player" text, "Team (League)" text, "Reg GP" real, "Pl GP" real )
SELECT written_by FROM table_15584067_4 WHERE no_in_series = 47
Name who wrote number 47
CREATE TABLE table_15584067_4 (written_by VARCHAR, no_in_series VARCHAR)
SELECT COUNT(DISTINCT language_id) FROM film
How many languages are in these films?
CREATE TABLE film (language_id VARCHAR)
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40059)
has patient 40059 received a lab test?
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE transfers ( row_id number,...
SELECT MAX(mass__kg_) FROM table_1558077_2
What is the largest mass(kg)?
CREATE TABLE table_1558077_2 (mass__kg_ INTEGER)
SELECT title FROM film WHERE rating = 'R'
What are all the movies rated as R? List the titles.
CREATE TABLE film (title VARCHAR, rating VARCHAR)
SELECT T2.lastname FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE stageposition = "back" GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1
What is the last name of the musicians who has played back position the most?
CREATE TABLE albums ( aid number, title text, year number, label text, type text ) CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE performance ( songid number, ...
SELECT college FROM table_15582870_1 WHERE choice = 143
Which college did draft pick #143 attend?
CREATE TABLE table_15582870_1 (college VARCHAR, choice VARCHAR)
SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1
Where is store 1 located?
CREATE TABLE store (address_id VARCHAR); CREATE TABLE address (address VARCHAR, address_id VARCHAR)
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_i...
what are the five most frequent lab tests that patients had in the same hospital visit after having received a refus lmb/lmbsac pst/pst operation until 2100?
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT weight FROM table_15582870_1 WHERE college = "Arkansas"
How heavy were the players who attended Arkansas?
CREATE TABLE table_15582870_1 (weight VARCHAR, college VARCHAR)
SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) LIMIT 1
Which staff handled least number of payments? List the full name and the id.
CREATE TABLE payment (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, last_name VARCHAR, staff_id VARCHAR)
SELECT usaf_space_flights FROM table_221315_3 WHERE max_speed__mph_ = 3822
What were all USAF space flights when the aximum speed was 3822?
CREATE TABLE table_221315_3 ( usaf_space_flights VARCHAR, max_speed__mph_ VARCHAR )
SELECT college FROM table_15582870_1 WHERE weight = 207
Which college did the player weighing 207 pounds attend?
CREATE TABLE table_15582870_1 (college VARCHAR, weight VARCHAR)
SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
Which language does the film AIRPORT POLLOCK use? List the language name.
CREATE TABLE film (language_id VARCHAR, title VARCHAR); CREATE TABLE LANGUAGE (name VARCHAR, language_id VARCHAR)
SELECT "Year of induction into Pro Football Hall of Fame" FROM table_29501 WHERE "Player" = 'Will Shields'
When was Will Shields inducted into the Pro Football Hall of Fame?
CREATE TABLE table_29501 ( "Number" real, "Player" text, "Position" text, "Seasons by team" text, "Year of induction into Pro Football Hall of Fame" text )
SELECT written_by FROM table_15584067_7 WHERE us_viewers__million_ = "1.81"
Name who wrote the episode when the viewers was 1.81
CREATE TABLE table_15584067_7 (written_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT COUNT(*) FROM store
How many stores are there?
CREATE TABLE store (Id VARCHAR)
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11826 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'heparin sodium'
what is the total dose heparin sodium that patient 11826 has been prescribed during their current hospital encounter?
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 ...
SELECT directed_by FROM table_15584067_7 WHERE no_in_series = "114"
Name who directed the 114 episode in the series
CREATE TABLE table_15584067_7 (directed_by VARCHAR, no_in_series VARCHAR)
SELECT COUNT(DISTINCT rating) FROM film
How many kinds of different ratings are listed?
CREATE TABLE film (rating VARCHAR)
SELECT "Pick #" FROM table_54414 WHERE "College" = 'mcmaster'
Which pick number attended McMaster College?
CREATE TABLE table_54414 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
SELECT COUNT(original_air_date) FROM table_15584067_7 WHERE no_in_series = "102"
Name the total number of air dates for 102 episode
CREATE TABLE table_15584067_7 (original_air_date VARCHAR, no_in_series VARCHAR)
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
Which movies have 'Deleted Scenes' as a substring in the special feature?
CREATE TABLE film (title VARCHAR, special_features VARCHAR)
SELECT COUNT(metres) FROM table_name_51 WHERE feet < 196
What is the sum of Metres wiht a Feet that's smaller than 196?
CREATE TABLE table_name_51 ( metres VARCHAR, feet INTEGER )
SELECT written_by FROM table_15584067_7 WHERE no_in_season = "11"
Name who wrote the 11 number in the season
CREATE TABLE table_15584067_7 (written_by VARCHAR, no_in_season VARCHAR)
SELECT COUNT(*) FROM inventory WHERE store_id = 1
How many items in inventory does store 1 have?
CREATE TABLE inventory (store_id VARCHAR)
SELECT SUM("Season") FROM table_55689 WHERE "Secondary Class Champion" = 'marcello puglisi (formula master italia)'
What are the seasons where Marcello Puglisi (formula master italia) was the secondary class champion?
CREATE TABLE table_55689 ( "Season" real, "Series Name" text, "Champion" text, "Team Champion" text, "Secondary Class Champion" text )
SELECT award_name FROM table_15584199_3 WHERE team_name = "BLACK OCEAN CURRENT"
Name the award name for black ocean current
CREATE TABLE table_15584199_3 (award_name VARCHAR, team_name VARCHAR)
SELECT payment_date FROM payment ORDER BY payment_date LIMIT 1
When did the first payment happen?
CREATE TABLE payment (payment_date VARCHAR)
SELECT Headquarter, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY MAX(Revenue)
Create a bar chart showing maximal revenue across headquarter, and sort by the y-axis 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 position FROM table_15592941_1 WHERE college = "Florida State"
What position(s) do players from florida state play?
CREATE TABLE table_15592941_1 (position VARCHAR, college VARCHAR)
SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
Where does the customer with the first name Linda live? And what is her email?
CREATE TABLE customer (email VARCHAR, address_id VARCHAR, first_name VARCHAR); CREATE TABLE address (address VARCHAR, address_id VARCHAR)
SELECT "Year" FROM table_6019 WHERE "Label" = 'cryptogramophon'
what year was cryptogramophon released
CREATE TABLE table_6019 ( "Year" real, "Artist" text, "Title" text, "Genre" text, "Label" text )
SELECT weight FROM table_15592941_1 WHERE player_name = "Geno Hayes"
How much does geno hayes weigh?
CREATE TABLE table_15592941_1 (weight VARCHAR, player_name VARCHAR)
SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.
CREATE TABLE film (title VARCHAR, replacement_cost INTEGER, LENGTH VARCHAR, rating VARCHAR)
SELECT Code, Price FROM Products WHERE Price BETWEEN 60 AND 120 GROUP BY Name
For those products with a price between 60 and 120, show me about the correlation between code and price , and group by attribute name in a scatter chart.
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 )