answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT minoru FROM table_name_38 WHERE block_a = "koji kanemoto"
Name the minoru for block A being koji kanemoto
CREATE TABLE table_name_38 ( minoru VARCHAR, block_a VARCHAR )
SELECT played FROM table_17369472_2 WHERE tries_for = "39"
How many were played when there were 39 tries for?
CREATE TABLE table_17369472_2 (played VARCHAR, tries_for VARCHAR)
SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs"
List the names, color descriptions and product descriptions of products with category "Herbs".
CREATE TABLE Ref_colors (color_description VARCHAR, color_code VARCHAR); CREATE TABLE products (product_name VARCHAR, product_description VARCHAR, color_code VARCHAR)
SELECT institution FROM table_261895_1 WHERE type = "Private/United Church of Christ"
which institutions can be categorized as private/united church of christ?
CREATE TABLE table_261895_1 ( institution VARCHAR, type VARCHAR )
SELECT COUNT(won) FROM table_17369472_2 WHERE points = "12"
How many were won when the points were 12?
CREATE TABLE table_17369472_2 (won VARCHAR, points VARCHAR)
SELECT COUNT(*) FROM products WHERE product_category_code = "Seeds"
How many products are there under the category "Seeds"?
CREATE TABLE products (product_category_code VARCHAR)
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, days, fare, flight, flight_fare WHERE ((((((flight.arrival_time < flight.departure_time) AND days.day_name = 'MONDAY' AND flight.flight_days = days.days_code) OR (days.day_na...
give me the cheapest one way flights between BOSTON and PHILADELPHIA which arrive after 1200 on a TUESDAY
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE flight_stop ( flight_id in...
SELECT won FROM table_17369472_2 WHERE points = "49"
How many were won when there were 49 points?
CREATE TABLE table_17369472_2 (won VARCHAR, points VARCHAR)
SELECT COUNT(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000
Find the number of products with category "Spices" and typically sold above 1000.
CREATE TABLE products (product_category_code VARCHAR, typical_buying_price VARCHAR)
SELECT winning_pitcher FROM table_12125069_2 WHERE attendance = 38109
Who is the winning pitcher when attendance is 38109?
CREATE TABLE table_12125069_2 ( winning_pitcher VARCHAR, attendance VARCHAR )
SELECT points FROM table_17369472_2 WHERE tries_for = "84"
How many points were there when tries for were 84?
CREATE TABLE table_17369472_2 (points VARCHAR, tries_for VARCHAR)
SELECT product_category_code, typical_buying_price FROM products WHERE product_name = "cumin"
What is the category and typical buying price of the product with name "cumin"?
CREATE TABLE products (product_category_code VARCHAR, typical_buying_price VARCHAR, product_name VARCHAR)
SELECT score FROM table_name_20 WHERE place = "t8" AND player = "byron nelson"
What is score of the game played in place t8 with Byron Nelson playing?
CREATE TABLE table_name_20 ( score VARCHAR, place VARCHAR, player VARCHAR )
SELECT team FROM table_17382360_7 WHERE date = "February 18"
what team play in february 18 in the supersonic season
CREATE TABLE table_17382360_7 (team VARCHAR, date VARCHAR)
SELECT product_category_code FROM products WHERE product_name = "flax"
Which category does the product named "flax" belong to?
CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR)
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents WHERE DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY outputevents.itemid) AS...
what were the top five most common output events a year before?
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT score FROM table_17382360_7 WHERE team = "Boston Celtics"
what is the score in february 12 of the boston celtics team
CREATE TABLE table_17382360_7 (score VARCHAR, team VARCHAR)
SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'
What is the name of the product with the color description 'yellow'?
CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_name VARCHAR, color_code VARCHAR)
SELECT "Ted Morris Memorial Trophy (Game MVP)" FROM table_25319 WHERE "Game" = '34th'
Name the ted morris memorial trophy 34th game
CREATE TABLE table_25319 ( "Game" text, "Date" text, "Champion" text, "Score" text, "Runner Up" text, "Stadium" text, "City" text, "Ted Morris Memorial Trophy (Game MVP)" text, "Bruce Coulter Award" text )
SELECT opponent FROM table_17386066_2 WHERE stadium = "Shea stadium"
Who is the opposing team when the game was played on the Shea Stadium?
CREATE TABLE table_17386066_2 (opponent VARCHAR, stadium VARCHAR)
SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'
Find the category descriptions of the products whose descriptions include letter 't'.
CREATE TABLE ref_product_categories (product_category_description VARCHAR, product_category_code VARCHAR); CREATE TABLE products (product_category_code VARCHAR, product_description VARCHAR)
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'Noah A Smith' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
coauthors of Noah A Smith
CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE field ( fie...
SELECT COUNT(record) FROM table_17386066_2 WHERE stadium = "Miami Orange Bowl"
How many games or records were played on the Miami Orange Bowl?
CREATE TABLE table_17386066_2 (record VARCHAR, stadium VARCHAR)
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip"
What is the color description of the product with name "catnip"?
CREATE TABLE products (color_code VARCHAR, product_name VARCHAR); CREATE TABLE ref_colors (color_description VARCHAR, color_code VARCHAR)
SELECT Users.DisplayName, Users.Reputation, Users.Id AS ID, Users.WebsiteUrl FROM Users JOIN (SELECT Users.Id AS UserId FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Users ON Users.Id = Posts.OwnerUserId WHERE (PostTags.TagId = 10 OR PostTags.TagId = 9) GROUP BY Users.Id) AS TopicUsers ON UserId = Users.I...
Developer in Israel That Do C++/C#. Users with Israel in their location who are active in C++/C#, sorted by rep (having more than 100 rep)
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, Rejectio...
SELECT result FROM table_17386066_2 WHERE date = "Nov. 26"
What was the result of the game that was played on Nov. 26, 1972?
CREATE TABLE table_17386066_2 (result VARCHAR, date VARCHAR)
SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil"
What is the color code and description of the product named "chervil"?
CREATE TABLE products (color_code VARCHAR, product_name VARCHAR); CREATE TABLE ref_colors (color_description VARCHAR, color_code VARCHAR)
SELECT "To par" FROM table_49338 WHERE "Player" = 'dave hill'
what is the to par for Dave hill?
CREATE TABLE table_49338 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
SELECT tamil_months FROM table_1740431_3 WHERE season_in_english = "Monsoon"
What are all Tamil months when the season in English is monsoon?
CREATE TABLE table_1740431_3 (tamil_months VARCHAR, season_in_english VARCHAR)
SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING COUNT(*) >= 2
Find the id and color description of the products with at least 2 characteristics.
CREATE TABLE product_characteristics (product_id VARCHAR); CREATE TABLE ref_colors (color_description VARCHAR, color_code VARCHAR); CREATE TABLE products (product_id VARCHAR, color_code VARCHAR)
SELECT AVG("Final") FROM table_60943 WHERE "All Around" > '19.35' AND "Total" > '40'
What is the average final with an all around greater than 19.35 and a total over 40?
CREATE TABLE table_60943 ( "Place" real, "Nation" text, "All Around" real, "Final" real, "Total" real )
SELECT english_translation FROM table_1740431_3 WHERE tamil_months = "mārkazhi, tai"
What is every English translation when Tamil months is Mārkazhi, Tai?
CREATE TABLE table_1740431_3 (english_translation VARCHAR, tamil_months VARCHAR)
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white"
List all the product names with the color description "white".
CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_name VARCHAR, color_code VARCHAR)
SELECT opponent FROM table_name_86 WHERE score = "7–5, 7–6 (8–6)"
who is the opponent when the score is 7 5, 7 6 (8 6)?
CREATE TABLE table_name_86 ( opponent VARCHAR, score VARCHAR )
SELECT gregorian_months FROM table_1740431_3 WHERE season_in_tamil = "இளவேனில்"
What is every Gregorian month when the season in Tamil is இளவேனில்?
CREATE TABLE table_1740431_3 (gregorian_months VARCHAR, season_in_tamil VARCHAR)
SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "yellow"
What are the name and typical buying and selling prices of the products that have color described as "yellow"?
CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_name VARCHAR, typical_buying_price VARCHAR, typical_selling_price VARCHAR, color_code VARCHAR)
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
What teachers are offering Other classes next Winter ?
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, ...
SELECT COUNT(season_in_tamil) FROM table_1740431_3 WHERE season_in_sanskrit = "Grishma"
How many seasons in Tamil occur when the season in Sanskrit is Grishma?
CREATE TABLE table_1740431_3 (season_in_tamil VARCHAR, season_in_sanskrit VARCHAR)
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame"
How many characteristics does the product named "sesame" have?
CREATE TABLE product_characteristics (product_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR)
SELECT MAX(price), MAX(score) FROM wine WHERE appelation = "St. Helena"
Give the maximum price and score for wines produced in the appelation St. Helena.
CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE appellations ( no numbe...
SELECT department FROM table_17384764_1 WHERE qualification = "M.Phil(Maths)"
Which departments have M.Phil(Maths)?
CREATE TABLE table_17384764_1 (department VARCHAR, qualification VARCHAR)
SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame"
How many distinct characteristic names does the product "cumin" have?
CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT "Papal Name" FROM table_22083 WHERE "Papal Name As Announced in Latin" = 'Ioannis Pauli primi'
What is the Papal name of the Pope announced as Ioannis Pauli Primi?
CREATE TABLE table_22083 ( "Birth Name" text, "Birth Name As Announced in Latin (Accusative case Forename Undeclined Surname)" text, "Papal Name" text, "Papal Name As Announced in Latin" text, "Latin declension of Papal Name" text, "Numeral in Papal Name" text )
SELECT COUNT(designation) FROM table_17384764_1 WHERE experience = "20 years"
How many faculty members have 20 years of experience?
CREATE TABLE table_17384764_1 (designation VARCHAR, experience VARCHAR)
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame"
What are all the characteristic names of product "sesame"?
CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT attendance FROM table_name_24 WHERE home_team = "f.c. central chugoku"
What is the attendance of the match with F.C. central chugoku as the home team?
CREATE TABLE table_name_24 ( attendance VARCHAR, home_team VARCHAR )
SELECT power_provided FROM table_174151_5 WHERE transfer_speed__mb_s_ = "1250"
Name the power provided for transfer speed mb/s is 1250
CREATE TABLE table_174151_5 (power_provided VARCHAR, transfer_speed__mb_s_ VARCHAR)
SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "cumin"
List all the characteristic names and data types of product "cumin".
CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_data_type VARCHAR, characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JO...
SELECT devices_per_channel FROM table_174151_5 WHERE raw_bandwidth__mbit_s_ = 2560
Name the devices per channel for 2560
CREATE TABLE table_174151_5 (devices_per_channel VARCHAR, raw_bandwidth__mbit_s_ VARCHAR)
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" AND t3.characteristic_type_code = "Grade"
List all characteristics of product named "sesame" with type code "Grade".
CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR, characteristic_type_code VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT "Abbr." FROM table_49040 WHERE "Votes (2011)" = '11.2%'
WHAT IS THE ABBR WITH VOTES OF 11.2% IN 2011?
CREATE TABLE table_49040 ( "Name (English)" text, "Name (German)" text, "Abbr." text, "Ideology" text, "Position" text, "Votes (2011)" text, "Seats in Hamburgische B\u00fcrgerschaft" real )
SELECT power_provided FROM table_174151_5 WHERE transfer_speed__mb_s_ = "300" AND max_cable_length__m_ = "10"
Name the power provided where transfer speed mb/s is 300 and max cable length of 10
CREATE TABLE table_174151_5 (power_provided VARCHAR, transfer_speed__mb_s_ VARCHAR, max_cable_length__m_ VARCHAR)
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel"
How many characteristics does the product named "laurel" have?
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT athlete FROM table_name_55 WHERE punishment = "six month suspension from iihf"
Which athlete had a six month suspension from IIHF?
CREATE TABLE table_name_55 ( athlete VARCHAR, punishment VARCHAR )
SELECT colorado FROM table_17425749_1 WHERE alaska = "Connecticut"
Name the colorado when alaska is connecticut
CREATE TABLE table_17425749_1 (colorado VARCHAR, alaska VARCHAR)
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax"
Find the number of characteristics that the product "flax" has.
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT SUM("Money ( $ )") FROM table_12086 WHERE "Score" = '69-72-67-71=279' AND "Player" = 'loren roberts'
Can you tell me the sum of Money ($) that has the Score of 69-72-67-71=279, and the Player of loren roberts?
CREATE TABLE table_12086 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
SELECT california FROM table_17425749_1 WHERE alaska = "Tennessee"
Name the california where alaska tennessee
CREATE TABLE table_17425749_1 (california VARCHAR, alaska VARCHAR)
SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "fast"
Find the name of the products that have the color description "red" and have the characteristic name "fast".
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR, characteristic_name VARCHAR); CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_id VARCHAR, color_code VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2155" AND prescriptions.route = "PR"
look for the number of patients taking drug via pr route who were admitted before 2155.
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 prescriptions...
SELECT date FROM table_17432028_1 WHERE score = "95-101"
Name the date for score of 95-101
CREATE TABLE table_17432028_1 (date VARCHAR, score VARCHAR)
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "hot"
How many products have the characteristic named "hot"?
CREATE TABLE products (product_id VARCHAR); CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR, characteristic_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT location_attendance FROM table_name_6 WHERE record = "3-1-0"
What is the location and attendance of the game with a 3-1-0 record?
CREATE TABLE table_name_6 ( location_attendance VARCHAR, record VARCHAR )
SELECT high_rebounds FROM table_17432028_1 WHERE date = "March 15"
Name the high rebounds for march 15
CREATE TABLE table_17432028_1 (high_rebounds VARCHAR, date VARCHAR)
SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "warm"
List the all the distinct names of the products with the characteristic name 'warm'.
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR, characteristic_name VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT "Title" FROM table_27768 WHERE "Directed by" = 'Linda Mendoza'
What is the title of the episode directed by Linda Mendoza?
CREATE TABLE table_27768 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text )
SELECT score FROM table_17432028_1 WHERE record = "2-5"
Name the score for record of 2-5
CREATE TABLE table_17432028_1 (score VARCHAR, record VARCHAR)
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow"
Find the number of the products that have their color described as "red" and have a characteristic named "slow".
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR, characteristic_name VARCHAR); CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_id VARCHAR, color_code VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date)
What is the number of booking start dates of the apartments with type code 'Duplex' in each year? Return a bar chart, show y axis in ascending order.
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_star...
SELECT COUNT(school) FROM table_17429402_7 WHERE last_occ_championship = "2006"
How many schools won their last occ championship in 2006?
CREATE TABLE table_17429402_7 (school VARCHAR, last_occ_championship VARCHAR)
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot"
Count the products that have the color description "white" or have the characteristic name "hot".
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR, characteristic_name VARCHAR); CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_id VARCHAR, color_code VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.icd9_code = "3532"
give me the number of patients admitted to the hospital before 2167 with the procedure icd9 code 3532.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT years_of_participation FROM table_17429402_7 WHERE school = "Central Crossing"
What are the years of participation for central crossing school?
CREATE TABLE table_17429402_7 (years_of_participation VARCHAR, school VARCHAR)
SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"
What is the unit of measuerment of the product category code "Herbs"?
CREATE TABLE ref_product_categories (unit_of_measure VARCHAR, product_category_code VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.dod_year <= "2155.0"
how many patients whose ethnicity is asian and year of death is less than or equal to 2155?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT MIN(occ_championships) FROM table_17429402_7 WHERE last_outright_occ_championship = "2006"
What is the fewest number of occ championships for the team that last won an outright occ championship in 2006?
CREATE TABLE table_17429402_7 (occ_championships INTEGER, last_outright_occ_championship VARCHAR)
SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices"
Find the product category description of the product category with code "Spices".
CREATE TABLE ref_product_categories (product_category_description VARCHAR, product_category_code VARCHAR)
SELECT AVG(wins) FROM table_name_49 WHERE podiums > 1 AND points = 80 AND starts < 28
what is the average wins when the podiums is more than 1, points is 80 and starts is less than 28?
CREATE TABLE table_name_49 ( wins INTEGER, starts VARCHAR, podiums VARCHAR, points VARCHAR )
SELECT years_of_participation FROM table_17429402_7 WHERE school = "Pickerington North"
What are the years of participation for pickerington north?
CREATE TABLE table_17429402_7 (years_of_participation VARCHAR, school VARCHAR)
SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"
What is the product category description and unit of measurement of category "Herbs"?
CREATE TABLE ref_product_categories (product_category_description VARCHAR, unit_of_measure VARCHAR, product_category_code VARCHAR)
SELECT SUM("Number of Contestants") FROM table_75309 WHERE "Season Premiere" = 'march 1, 2009'
How many contestants were there on March 1, 2009 during the season premiere?
CREATE TABLE table_75309 ( "Season" text, "Season Premiere" text, "Season Finale" text, "Winner" text, "Runner-up" text, "Number of Contestants" real, "Winner's Country" text, "Runner Up's Country" text )
SELECT event FROM table_17417383_6 WHERE athlete = "Redouane Bouchtouk"
Name the event for redouane bouchtouk
CREATE TABLE table_17417383_6 (event VARCHAR, athlete VARCHAR)
SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "cumin"
What is the unit of measurement of product named "cumin"?
CREATE TABLE ref_product_categories (unit_of_measure VARCHAR, product_category_code VARCHAR); CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR)
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.pre_course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.course_id INNER JOIN area ON COURSE_0.course_id = area.course_id ...
What intelligent systems classes are required prior to taking 463 ?
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, t...
SELECT round_of_16 FROM table_17417383_6 WHERE quarterfinals = "Did not advance" AND event = "Light flyweight"
Name the round 16 for did not advance and light flyweight
CREATE TABLE table_17417383_6 (round_of_16 VARCHAR, quarterfinals VARCHAR, event VARCHAR)
SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "chervil"
Find the unit of measurement and product category code of product named "chervil".
CREATE TABLE ref_product_categories (unit_of_measure VARCHAR, product_category_code VARCHAR); CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR)
SELECT "Man of the Match" FROM table_23083 WHERE "Result" = 'Rockets won by 9 wickets'
Who was the man of the match when the Rockets won by 9 wickets?
CREATE TABLE table_23083 ( "Scorecard" real, "Date" text, "Venue" text, "Team 1" text, "Team 2" text, "Result" text, "Man of the Match" text )
SELECT athlete FROM table_17417383_6 WHERE round_of_32 = "Enkhzorig ( MGL ) L 1–10"
Name the athelte for enkhzorig ( mgl ) l 1–10
CREATE TABLE table_17417383_6 (athlete VARCHAR, round_of_32 VARCHAR)
SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure <> "Handful"
Find the product names that are colored 'white' but do not have unit of measurement "Handful".
CREATE TABLE products (product_name VARCHAR, product_category_code VARCHAR, color_code VARCHAR); CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE ref_product_categories (product_category_code VARCHAR, unit_of_measure VARCHAR)
SELECT "Try bonus" FROM table_70632 WHERE "Points" = '58'
What is the try bonus when there were 58 points?
CREATE TABLE table_70632 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT quarterfinals FROM table_17427004_7 WHERE athlete = "Abdelhafid Benchebla"
Who did Abdelhafid Benchebla face in the quarterfinals?
CREATE TABLE table_17427004_7 (quarterfinals VARCHAR, athlete VARCHAR)
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1
What is the description of the color for most products?
CREATE TABLE ref_colors (color_description VARCHAR, color_code VARCHAR); CREATE TABLE products (color_code VARCHAR)
SELECT "New/Returning/Same Network" FROM table_50874 WHERE "Returning" = 'april 3' AND "Show" = 'shop ''til you drop'
Which network returns april 3, and a Show of shop 'til you drop?
CREATE TABLE table_50874 ( "Show" text, "Last Aired" real, "Previous Network" text, "Retitled as/Same" text, "New/Returning/Same Network" text, "Returning" text )
SELECT round_of_32 FROM table_17427004_7 WHERE athlete = "Nabil Kassel"
Who did Nabil Kassel face in the Round of 32?
CREATE TABLE table_17427004_7 (round_of_32 VARCHAR, athlete VARCHAR)
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) LIMIT 1
What is the description of the color used by least products?
CREATE TABLE ref_colors (color_description VARCHAR, color_code VARCHAR); CREATE TABLE products (color_code VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.label = "Potassium, Whole Blood"
provide the number of patients whose gender is m and lab test name is potassium, whole blood?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT semifinals FROM table_17427004_7 WHERE athlete = "Hamza Kramou"
How did Hamza Kramou fare in the semifinals?
CREATE TABLE table_17427004_7 (semifinals VARCHAR, athlete VARCHAR)
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1
What is the characteristic name used by most number of the products?
CREATE TABLE products (product_id VARCHAR); CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
SELECT "Away team score" FROM table_10333 WHERE "Home team" = 'geelong'
What was the score of the other team that played Geelong?
CREATE TABLE table_10333 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )