sentence
stringlengths
3
347
sql
stringlengths
18
804
How many apps are labeled 7?
SELECT COUNT(app_id) FROM app_labels WHERE label_id = 7
Find the the grape whose white color grapes are used to produce wines with scores higher than 90.
SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90
Who has the first leg that has a round in the semi-final?
SELECT first_leg FROM table_name_53 WHERE round = "semi-final"
How many schools are there?
SELECT COUNT(*) FROM school
How many poles does the European F3 Open series have?
SELECT poles FROM table_29434211_1 WHERE series = "European F3 Open"
Could you please tell me the total amount paid in claim headers?
SELECT sum ( amount_piad ) FROM claim_headers
Which Club/province has a Position of centre, and Caps of 27?
SELECT club_province FROM table_name_75 WHERE position = "centre" AND caps = 27
Find the emails of parties with the most popular party form.
SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)
What district does James Humphrey represent?
SELECT district from people where name = "James Humphrey"
What document status codes do we have?
SELECT document_status_code FROM Ref_Document_Status;
how many new points does the player roberta vinci have?
SELECT MAX(new_points) FROM table_29572583_20 WHERE player = "Roberta Vinci"
Who is the Lutheran representative that served in the state of Ohio for 14 years before becoming a senator?
SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 14 THEN official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Lutheran' AND T2.state = 'OH' AND T2.type = 'rep'
Who had the high rebounds when the score was l 122–93?
SELECT high_rebounds FROM table_name_7 WHERE score = "l 122–93"
How many people live in the district who's capital is héngfēng xiàn?
SELECT population FROM table_1300525_1 WHERE pinyin = "Héngfēng Xiàn"
What is the Record for a game smaller than 24, Lundqvist was the decision, November less than 8, and opponent Was New York Islanders?
SELECT record FROM table_name_57 WHERE game < 24 AND decision = "lundqvist" AND november < 8 AND opponent = "new york islanders"
Tell me the partner for opponents of anamika bhargava sylvia krywacz
SELECT partner FROM table_name_15 WHERE opponents_in_the_final = "anamika bhargava sylvia krywacz"
What was the nationality of the winner on December 8, 1968?
SELECT country FROM table_name_99 WHERE date = "december 8, 1968"
What is the High points with a Date that is january 20?
SELECT high_points FROM table_name_35 WHERE date = "january 20"
Provide the zip codes and area codes of the postal points with the community post office type at the elevation above 6000.
SELECT T1.zip_code, T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.type = 'Community Post Office ' AND T2.elevation > 6000
List the country and how many customers are there.
SELECT country, COUNT(customerNumber) FROM customers GROUP BY country
Find the name of the product that has the smallest capacity.
SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1
What date was that claim settled?
SELECT T1.Date_Claim_settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id order by T1.Amount_Claimed desc limit 1
Could you list the catalog publishers in descending order? | order by what? | Alphabetical order
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY catalog_publisher DESC
Can you just show me the first names of those customers?
SELECT first_name FROM customer WHERE customer_id NOT IN ( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )
What is the sum of all laps with rank 3?
SELECT COUNT(laps) FROM table_name_99 WHERE rank = "3"
How many of the patients born in 1920s had pneumonia?
SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE DESCRIPTION = 'Pneumonia' AND strftime('%Y', T1.birthdate) LIKE '192%'
Provide the names of bad aliases in the city of Aguadilla.
SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Aguadilla'
What is the count and code of the job with the most employee?
SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1
For the game ending with a record of 31-43-2, what was the decision?
SELECT decision FROM table_name_10 WHERE record = "31-43-2"
What product type is the one that has the least expensive product price? | Did you want to get Product Type Code that has the least expensive product price ? | Yes
select Product_Type_Code from Products order by Product_Price limit 1
What is the lowest played with a lost bigger than 10?
SELECT MIN(played) FROM table_name_85 WHERE lost > 10
Who wrote all the shows with 18.73 u.s. viewers?
SELECT written_by FROM table_1130632_1 WHERE us_viewers__million_ = "18.73"
What is the maximum, minimum and average market share of the listed browsers?
SELECT max(market_share) , min(market_share) , avg(market_share) FROM browser
For the movie in which Tress MacNeille was the voice actor for its character "Hyacinth Hippo", what was the release date of that movie?
SELECT T1.release_date FROM characters AS T1 INNER JOIN `voice-actors` AS T2 ON T2.movie = T1.movie_title WHERE T2.character = 'Hyacinth Hippo' AND T2.`voice-actor` = 'Tress MacNeille'
what is the to par when the place is 8?
SELECT to_par FROM table_name_82 WHERE place = "8"
What is the sum of the clubs remaining with 34 new entries this round and more than 34 clubs involved?
SELECT SUM(clubs_remaining) FROM table_name_25 WHERE new_entries_this_round = "34" AND clubs_involved > 34
What is the team with position G?
SELECT team FROM table_name_94 WHERE position = "g"
What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'
Which lots are not used in any transactions? | do you mean the id of lots or the details of lot | The id of the lots please.
SELECT lot_id FROM Lots EXCEPT SELECT T1.lot_id FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id
What is the name of the highest mountain?
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
What are the full name, hire date, salary, and department id for employees without the letter M in their first name?
SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'
Show order ids and the number of products in each order.
SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id
Find the name of organizations whose names contain "Party".
SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%"
Which year has the most degrees conferred?
SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
What was the result of the game when the record was 5-1?
SELECT result FROM table_name_21 WHERE record = "5-1"
And what is the capacity of the Whitman room?
select capacity from classroom where building = 'Whitman'
What is the smallest Alliance where the total is 25?
SELECT MIN(alliance) FROM table_28005809_2 WHERE total = 25
What is the total when the finish was t44?
SELECT total FROM table_name_99 WHERE finish = "t44"
Which Player has a Nationality of united states, a Position of forward, and a School/Club Team of notre dame?
SELECT player FROM table_name_1 WHERE nationality = "united states" AND position = "forward" AND school_club_team = "notre dame"
List the Episode of all TV series showed on TV Channel with series name "Sky Radio".
SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio";
What is the Record for the game held on December 2, 2001?
SELECT record FROM table_name_52 WHERE date = "december 2, 2001"
WHich Places have a score smaller than 69?
SELECT place FROM table_name_12 WHERE score < 69
What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?
SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
What country is ranked #2?
SELECT country FROM table_name_68 WHERE rank = 2
Find the name and id of accounts whose checking balance is below the maximum checking balance.
SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking)
What are the different names of the product characteristics?
SELECT DISTINCT characteristic_name FROM CHARACTERISTICS
Name the least podiums for 49 points
SELECT MIN(podiums) FROM table_20398823_1 WHERE points = "49"
Please show different software platforms and the corresponding number of devices using each.
SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform
List the document type code for the document with the id 2.
SELECT document_type_code FROM Documents WHERE document_id = 2;
What is the match number that had a result of 0:5 (0:3)?
SELECT COUNT(match) FROM table_name_20 WHERE result = "0:5 (0:3)"
Russia has films in which category?
SELECT category FROM table_name_45 WHERE country = "russia"
IN THE ISSUE WITH KARA MONACO ON THE COVER, WHO WAS THE INTERVIEW SUBJECT?
SELECT interview_subject FROM table_1566852_7 WHERE cover_model = "Kara Monaco"
Show names of all high school students who do not have any friends.
SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id
List the names of the customers who have once bought product "food".
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*) >= 1
Among games sold in Europe, list the platform ID of games with sales lesser than 30% of the average number of sales.
SELECT DISTINCT T3.platform_id FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id WHERE T1.region_name = 'Europe' AND T2.num_sales * 100 * 100000 < ( SELECT AVG(T2.num_sales * 100000) * 30 FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Europe' )
What is the status for 07/01/1961?
SELECT status FROM table_name_91 WHERE date = "07/01/1961"
What about Salt Lake City?
SELECT count ( DISTINCT name ) FROM PersonFriend WHERE friend NOT IN ( SELECT name FROM person WHERE city = 'salt lake city' )
What region is the catalogue released on June 8, 2004 from?
SELECT region FROM table_name_88 WHERE date = "june 8, 2004"
Give the names of mountains in alphabetical order.
SELECT Name FROM mountain ORDER BY Name ASC
What is the channel that is on digital terrestrial channel 10?
SELECT channel FROM table_182410_10 WHERE digital_terrestrial_channel = "10"
How many different locations does each school have?
SELECT count(DISTINCT dept_address) , school_code FROM department GROUP BY school_code
How many mls teams had player jamel wallace?
SELECT COUNT(mls_team) FROM table_25518547_4 WHERE player = "Jamel Wallace"
Find the states where have the colleges whose enrollments are less than the largest size.
SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)
What years are listed for analogue cable with 35 channels?
SELECT years FROM table_name_27 WHERE transmission = "analogue cable" AND no_of_channels = "35"
Find the most prominent max page size among all the products.
SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
Which player finished at +4?
SELECT player FROM table_name_31 WHERE to_par = "+4"
Indicate the ISBN13 of all the books that have less than 140 pages and more than 135.
SELECT isbn13 FROM book WHERE num_pages < 140 AND num_pages > 135
What is the Nationality of the Swimmer in Lane 4 or larger with a Rank of 5 or more?
SELECT nationality FROM table_name_37 WHERE lane > 4 AND rank > 5
Show the industries shared by companies whose headquarters are "USA" and companies whose headquarters are "China".
SELECT Industry FROM Companies WHERE Headquarters = "USA" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = "China"
What are the first and last names of all students who are living in a dorm with a TV Lounge?
SELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')
What title has a Label of warp records / paper bag records?
SELECT title FROM table_name_39 WHERE label = "warp records / paper bag records"
In which season did he have 0 Poles and 19th position in the GP2 Series?
SELECT season FROM table_name_57 WHERE poles = "0" AND series = "gp2 series" AND position = "19th"
What are the earnings of poker players, ordered descending by value?
SELECT Earnings FROM poker_player ORDER BY Earnings DESC
What is the singular for the Meaning of night?
SELECT singular FROM table_name_28 WHERE meaning = "night"
How many female mailing list subscribers from Sacramento gave a 4-star rating between 1/3/2016 and 10/26/2016?
SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 4 AND T1.City = 'Sacramento' AND T1.Gender = 'F' AND T1.SubscribedToEmailList = 'TRUE' AND T2.ReviewDate BETWEEN '2013-01-03' AND '2013-10-26'
How many sections does each course have?
SELECT count(*) , crs_code FROM CLASS GROUP BY crs_code
Among all closed businesses in Avondale, AZ what percent have obtained a 'wonderful experience' rating of the business.
SELECT CAST(SUM(CASE WHEN stars > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(stars) FROM Business WHERE city = 'Avondale' AND active = 'false'
Which Scorers have a Venue of A, and an Opponent of arsenal?
SELECT scorers FROM table_name_41 WHERE venue = "a" AND opponent = "arsenal"
What is the percentage of female competitors whose heights are over 170 that participated in the game in 1988?
SELECT CAST(COUNT(CASE WHEN T3.gender = 'F' AND T3.height > 170 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_year = 1988
What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.
SELECT address_content FROM addresses WHERE city = "East Julianaside" AND state_province_county = "Texas" UNION SELECT address_content FROM addresses WHERE city = "Gleasonmouth" AND state_province_county = "Arizona"
How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.
SELECT T1.staff_name , count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name
Now can you list the titles of the books and the prices but in descending order?
SELECT t2.price, t1.title FROM book as t1 join publication as t2 on t1.book_id = t2.book_id order by t2.price desc
Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
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
Among the male students, list down the names of students with payment due.
SELECT T1.name FROM male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'pos'
How many transfer fees did Afonso Alves have after 2008?
SELECT COUNT(transfer_fee___) AS €_million_ FROM table_name_13 WHERE player = "afonso alves" AND year > 2008
What are the names of the clubs that have players in the position of "Right Wing"?
SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = "Right Wing"
How much Puchat Ligi has a Total smaller than 5, and an Ekstraklasa larger than 1?
SELECT SUM(puchat_ligi) FROM table_name_46 WHERE total < 5 AND ekstraklasa > 1
Where was the destination city of shipment no.1701?
SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1701'
Which authority has a Name of tamatea high school?
SELECT authority FROM table_name_41 WHERE name = "tamatea high school"
Name the english translation of giefdu mier socka bond
SELECT english_translation FROM table_13003460_1 WHERE the_icelandic_of_the_glossary = "giefdu mier socka bond"