sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the sales reasons for order 43718? | SELECT T2.Name FROM SalesOrderHeaderSalesReason AS T1 INNER JOIN SalesReason AS T2 ON T1.SalesReasonID = T2.SalesReasonID WHERE T1.SalesOrderID = 43718 |
What is the average total score of body builders with height bigger than 200? | SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200 |
What is the Elimination for Candice? | SELECT elimination FROM table_name_96 WHERE wrestler = "candice" |
How many customer listed ? | SELECT count ( * ) FROM customers AS t1 |
What is the number of affected regions for each storm? | SELECT T1.name , count ( * ) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id |
Provide the universities which got the highest scores. | SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id GROUP BY T1.university_name ORDER BY SUM(T2.score) DESC LIMIT 1 |
To which party does Riley Joseph Wilson belong? | SELECT party FROM table_1342370_17 WHERE incumbent = "Riley Joseph Wilson" |
Find the state of the college which player Charles is attending. | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles' |
What is the description of the intact software? | SELECT description FROM table_25474825_1 WHERE software = "IntAct" |
What is the segment C of the episode where segment B is Film Digitization? | SELECT segment_c FROM table_15187735_19 WHERE segment_b = "Film Digitization" |
Which vocal type is the most frequently appearring type? | SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 |
What tournament had a 1 point margin of victory? | SELECT tournament FROM table_name_12 WHERE margin_of_victory = "1 point" |
When the losing bonus was 2 what was drawn score? | SELECT drawn FROM table_name_97 WHERE losing_bonus = "2" |
Which network broadcast the game when the Western Bulldogs played melbourne? | SELECT broadcaster FROM table_24919137_2 WHERE opposition = "Melbourne" |
When 0,4, or 8 mb is the nupowr 117 what is the nupowr 183? | SELECT nupowr_183 FROM table_3002894_4 WHERE nupowr_117 = "0,4, or 8 MB" |
What was the score on September 1, 1996? | SELECT result FROM table_name_50 WHERE date = "september 1, 1996" |
What are the full names of students minoring in department 140? | SELECT T2.Fname , T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140 |
show the number of products with category Spices? | SELECT count ( * ) FROM products WHERE product_category_code = 'Spices' |
Which Total has a Club of darlington, and a League goals of 13, and a League Cup goals of 1? | SELECT SUM(total) FROM table_name_68 WHERE club = "darlington" AND league_goals = "13" AND league_cup_goals = "1" |
How many percent more of the stars for the repository of solution No.51424 than No.167053? | SELECT CAST(SUM(CASE WHEN T2.Id = 51424 THEN T1.Stars ELSE 0 END) - SUM(CASE WHEN T2.Id = 167053 THEN T1.Stars ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 167053 THEN T1.Stars ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId |
Name the gdp where gdp per capita 20200 | SELECT gdp__billion_us$_ FROM table_1307842_7 WHERE gdp_per_capita__us$_ = 20200 |
What is the call sign of the translator in Spring Valley, Nevada? | SELECT call_sign FROM table_name_16 WHERE city_of_license = "spring valley, nevada" |
What are the id and first name of the student whose addresses have the highest average monthly rental? | SELECT T1.student_id , T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1 |
For the goalie who had the highest defensive success rate in the postseason of 2011, what's his legends ID ? | SELECT T2.legendsID FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2011 ORDER BY 1 - CAST(T1.PostGA AS REAL) / T1.PostSA DESC LIMIT 1 |
When was the school in Springfield, Massachusetts founded? | SELECT MAX(founded) FROM table_1974782_1 WHERE location = "Springfield, Massachusetts" |
How many total medals for the netherlands? | SELECT SUM(total) FROM table_name_9 WHERE nation = "netherlands" |
Find the id and name of customers whose address contains WY state and do not use credit card for payment. | SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code <> "Credit Card" |
What player is from Fiji? | SELECT player FROM table_name_67 WHERE country = "fiji" |
Name the lowest Round with Opponent of rolando delgado? | SELECT MIN(round) FROM table_name_18 WHERE opponent = "rolando delgado" |
How many employees are there? | SELECT count(*) FROM Staff; |
Sorry, I think I misunderstood the question. Can you display only the apartment type codes again for each entry? | SELECT apt_type_code FROM Apartments |
How many outputs are there for solid state, battery operated for portable use listed in notes? | SELECT COUNT(outputs) FROM table_25276250_3 WHERE notes = "Solid state, battery operated for portable use" |
What is the sum of the values for Melbourne, when Episode Number Production Number is 19 2-06, and when Sydney is less than 389,000? | SELECT SUM(melbourne) FROM table_name_93 WHERE episode_number_production_number = "19 2-06" AND sydney < 389 OFFSET 000 |
List the names of departments where some physicians are primarily affiliated with. | SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1 |
What was the incumbent of texas 3? | SELECT incumbent FROM table_1341663_44 WHERE district = "Texas 3" |
Calculate the total winning match for Deccan Chargers. | SELECT SUM(T2.Match_Winner) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T1.Team_Name = 'Deccan Chargers' |
What country does Rocco Mediate play for? | SELECT country FROM table_name_77 WHERE player = "rocco mediate" |
Find the id of the candidate who got the lowest oppose rate. | SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1 |
What was Ralph Shoaf's pick number? | SELECT pick FROM table_name_39 WHERE name = "ralph shoaf" |
what is the birth date when the weight (kg) is 100 and the world rank is 2? | SELECT birth_date FROM table_name_3 WHERE weight__kg_ = "100" AND world_rank = "2" |
What is the first leg score in that match where Marseille was the first team? | SELECT 1 AS st_leg FROM table_name_85 WHERE team_1 = "marseille" |
What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? | SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 |
What is the ratio between the number of object samples in image 1 and the number of object samples in image 6? | SELECT CAST(SUM(CASE WHEN IMG_ID = 1 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN IMG_ID = 6 THEN 1 ELSE 0 END) FROM IMG_OBJ |
How many directors worked on the episode written by Brent Fletcher & Miranda Kwok? | SELECT COUNT(directed_by) FROM table_23918997_1 WHERE written_by = "Brent Fletcher & Miranda Kwok" |
How many customers do we have? | SELECT count(*) FROM Customers |
Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations? | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.overallby = 'Arizona Coyotes' AND T2.draftyear = 2000 ORDER BY T1.PIM DESC LIMIT 1 |
What are all distinct country for artists? | SELECT DISTINCT country FROM artist |
What season has 6 races and the team is Australia? | SELECT season FROM table_name_90 WHERE races = 6 AND team = "australia" |
What is the highest Goals For, when Team is "Cheadle Town", and when Drawn is greater than 7? | SELECT MAX(goals_for) FROM table_name_2 WHERE team = "cheadle town" AND drawn > 7 |
What were Gentleman's odds of winner? | SELECT odds_of_winner FROM table_21676617_1 WHERE horse = "Gentleman" |
What was the earliest year that Yvette Alexander took office and was up for reelection after 2016? | SELECT MIN(took_office) FROM table_name_70 WHERE name = "yvette alexander" AND up_for_reelection > 2016 |
What is the away team where the home team is Coventry City? | SELECT away_team FROM table_name_73 WHERE home_team = "coventry city" |
Find the first name, country code and birth date of the winner who has the highest rank points in all matches. | SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1 |
How many tasks are there? | SELECT count(*) FROM Tasks |
Name the gdp per capita for haiti | SELECT gdp__ppp__per_capita___intl_$___2011 FROM table_26313243_1 WHERE country = "Haiti" |
What is the release date of vhs super callanetics? | SELECT release_date FROM table_name_96 WHERE format = "vhs" AND title = "super callanetics" |
What is Place, when Score is "70-68=138", and when Player is "Andrew Magee"? | SELECT place FROM table_name_1 WHERE score = 70 - 68 = 138 AND player = "andrew magee" |
what are the order id and customer id of the oldest order? | SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1 |
How many more movie lists were created by the user who created the movie list "250 Favourite Films"? | SELECT COUNT(list_id) FROM lists_users WHERE user_id = ( SELECT user_id FROM lists WHERE list_title = '250 Favourite Films' ) |
What date was the score 29-7? | SELECT date FROM table_name_28 WHERE score = "29-7" |
Which regio has a date of 24 march 2006? | SELECT region FROM table_name_15 WHERE date = "24 march 2006" |
What is all the information regarding employees with salaries above the minimum and under 2500? | SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500 |
Find the payment method that is used most frequently. | SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1 |
List the time of elimination of the wrestlers with largest days held. | SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 |
What are the average prices of products for each manufacturer? | SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name |
How many U.S. air dates were from an episode in Season 4? | SELECT COUNT(us_airdate) FROM table_19422702_1 WHERE no_in_season = 4 |
How many films released between 1/2/1990 and 12/30/2000 starred Uma Thurman? | SELECT COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Uma Thurman' AND T1.release_date BETWEEN '1990-01-01' AND '2000-12-31' |
Find the names of artists that do not have any albums. | SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId |
What is the location of the Carousel toll plaza? | SELECT location FROM table_1211545_2 WHERE name = "Carousel Toll Plaza" |
What percentage of the votes did Obama get in the county where McCain got 3648 votes? | SELECT obama_percentage FROM table_20539826_1 WHERE mccain_number = 3648 |
Who is the Director of Fish Tales? | SELECT director FROM table_name_94 WHERE title = "fish tales" |
The school nicknamed the wildcats has what sum of enrollment? | SELECT SUM(enrollment) FROM table_name_5 WHERE team_nickname = "wildcats" |
With a score of 68-65=133 and United States as the country what is the To par? | SELECT to_par FROM table_name_66 WHERE country = "united states" AND score = 68 - 65 = 133 |
Which astrological sign has the Latin motto of Vita? | SELECT sign FROM table_name_21 WHERE latin_motto = "vita" |
What semester in that year offers the largest number of courses? | SELECT semester FROM SECTION where year = 2002 GROUP BY semester ORDER BY count ( * ) DESC LIMIT 1 |
What is the team when player is listed as Ronjay Buenafe? | SELECT team FROM table_28628309_8 WHERE player = "Ronjay Buenafe" |
Who directed the episode that had a production code of 2j5457? | SELECT directed_by FROM table_25851971_1 WHERE production_code = "2J5457" |
What is the origin for the item with an owner of Hunan Broadcasting System (HBS)? | SELECT origin FROM table_name_82 WHERE owner = "hunan broadcasting system (hbs)" |
List the name for storms and the number of affected regions for each storm. | SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id |
Which Athlete has a Rank larger than 1, and a Lane larger than 7, and a Nationality of china? | SELECT athlete FROM table_name_97 WHERE rank > 1 AND lane > 7 AND nationality = "china" |
what is the billing address of germany | Billing address is associated with each customer, not country. Please clarify your question. | what is the address of state sp | SELECT address from customers where state = 'SP' |
Count the number of regions. | SELECT count(*) FROM region |
If the player is William Jakes, what are the total points? | SELECT MIN(total_points) FROM table_27533947_1 WHERE players = "William Jakes" |
how many school are presented on the table | SELECT count ( * ) FROM school |
List the top 5 most-rented films. | SELECT T.title FROM ( SELECT T3.title, COUNT(T2.inventory_id) AS num FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id GROUP BY T3.title ) AS T ORDER BY T.num DESC LIMIT 5 |
List all club names in descending alphabetical order. | SELECT name FROM club ORDER BY name DESC |
How long is the longest relationship? | SELECT max ( year ) FROM PersonFriend |
Name the lowest year for 12th position | SELECT MIN(year) FROM table_name_4 WHERE position = "12th" |
What are the order dates of orders with a price higher than 1000? | SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000 |
What are the names of conductors who have conducted at more than one orchestra? | SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1 |
Please list the titles of all the podcasts under the category "arts-performing-arts". | SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts-performing-arts' |
In the 2014 Winter game, what is the percentage of competitors who age 28 years old? | SELECT CAST(COUNT(CASE WHEN T2.age = 28 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 WHERE T1.games_name = '2014 Winter' |
What organization id Denesik and Sons Party? | SELECT organization_id FROM Organizations
where organization_details = 'Denesik and Sons Party' |
how many airports in the list? | SELECT DISTINCT ( COUNT ( name ) ) FROM airports |
What was the average amount of losses for teams with played less than 14? | SELECT AVG(lost) FROM table_name_5 WHERE played < 14 |
What is the average grid for the +2.2 secs time/retired? | SELECT AVG(grid) FROM table_name_44 WHERE time_retired = "+2.2 secs" |
What is the IATA of galeão airport? | SELECT iata FROM table_name_58 WHERE airport = "galeão airport" |
What type had a course of Grosseto To Rieti? | SELECT type FROM table_name_18 WHERE course = "grosseto to rieti" |
What's the hometown of the player who is 6-4? | SELECT hometown FROM table_name_45 WHERE height = "6-4" |
If the player is Maake Kemoeatu, what is the int maximum? | SELECT MAX(int) FROM table_25773915_11 WHERE player = "Maake Kemoeatu" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.