sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Calculate the average number of repetitions in the pairs of words in which the first word id is number 34. | SELECT CAST(SUM(CASE WHEN w1st = 34 THEN 1 ELSE 0 END) AS REAL) / COUNT(w1st) FROM biwords |
What is the average Laps for andrea de cesaris? | SELECT AVG(laps) FROM table_name_76 WHERE driver = "andrea de cesaris" |
What school did the rb drafted attend? | SELECT school FROM table_24540893_6 WHERE position = "RB" |
What is Country, when To par is "1", and when Player is "Seve Ballesteros"? | SELECT country FROM table_name_20 WHERE to_par = 1 AND player = "seve ballesteros" |
List all countries and their number of airlines in the descending order of number of airlines. | SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC |
What yacht did Andrew Saies sail on? | SELECT yacht FROM table_25561560_3 WHERE skipper = "Andrew Saies" |
Which part one is class 7d? | SELECT part_1 FROM table_name_36 WHERE class = "7d" |
What is the total number of customers across banks? | SELECT sum(no_of_customers) FROM bank |
"Cumin" data types | SELECT 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" |
Which submission received the highest score in acceptance result. Show me the result. | SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 |
What are the top five most popular episodes? | SELECT episode_id FROM Episode ORDER BY votes DESC LIMIT 5; |
What was the score of the tied game or the away team of Crewe Alexandra? | SELECT tie_no FROM table_name_13 WHERE away_team = "crewe alexandra" |
Find the number of distinct currency codes used in drama workshop groups. | SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups |
Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference. | SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1 |
What are the years for the player with fewer than 62 goals, debut year of 1981 and 28 games? | SELECT years_at_club FROM table_name_61 WHERE goals < 62 AND debut_year = 1981 AND games = 28 |
Could you show me all the locations that have train stations with at least 15 platforms? | SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms > = 15 |
Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year. | SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year |
What is the venue for the friendly competition and score of 4-0? | SELECT venue FROM table_name_53 WHERE score = "4-0" AND competition = "friendly" |
What is the Date of the Game with a Result of w 22–16 in TV Time of CBS 1:00ET? | SELECT date FROM table_name_90 WHERE tv_time = "cbs 1:00et" AND result = "w 22–16" |
Write down the tweet text posted from Rawang, Selangor, Malaysia. | SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City = 'Rawang' AND T2.State = 'Selangor' AND T2.Country = 'Malaysia' |
What's Number & Name listed for the Date 1967? | SELECT number_ & _name FROM table_name_61 WHERE date = 1967 |
Name the score for 29 game | SELECT score FROM table_27537870_5 WHERE game = 29 |
What is the lowest grid with time of +0.499,when laps are larger than 21? | SELECT MIN(grid) FROM table_name_33 WHERE time = "+0.499" AND laps > 21 |
Find the address of all customers that live in Germany and have invoice. | SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany" |
how many times is the week # is audition? | SELECT COUNT(original_artist) FROM table_27075510_1 WHERE week__number = "Audition" |
The movie 'Gojira ni-sen mireniamu' is from which country? | SELECT T3.COUNTry_name FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T1.title = 'Gojira ni-sen mireniamu' |
what is the teacher id of detention id 1 | select teacher_id from detention where detention_id = 1 |
What was the final score of the game at Texas Stadium? | SELECT final_score FROM table_name_26 WHERE stadium = "texas stadium" |
What shows for Marcin Dołęga ( POL )when the world record shows olympic record, and a Snatch of total? | SELECT marcin_dołęga___pol__ FROM table_name_76 WHERE world_record = "olympic record" AND snatch = "total" |
What is Score, when To Par is "+1", and when Player is "Mike Souchak"? | SELECT score FROM table_name_7 WHERE to_par = "+1" AND player = "mike souchak" |
Can you show me the email addresses of all the customers who paid with Visa? | SELECT customer_email FROM Customers where payment_method = "Visa" |
List the names of counties in descending order of population. | SELECT Name FROM county_public_safety ORDER BY Population DESC |
What is the total number of Wins, when Losses is less than 10, when Against is less than 1253, and when Byes is less than 0? | SELECT COUNT(wins) FROM table_name_42 WHERE losses < 10 AND against < 1253 AND byes < 0 |
What are the wines that have prices higher than 50 and made of Red color grapes? | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 |
Please name any three sovereign nations that have been governed by the republic since 1991. | SELECT country FROM politics WHERE government = 'republic' AND STRFTIME('%Y', independence) >= '1991' AND country IN ( SELECT country FROM country ) ORDER BY independence LIMIT 3 |
What is the entry name of the most expensive catalog (in USD)? | SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1 |
find the name and college of students whose player position are goalie in the tryout | SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.pPos = 'goalie' |
Find the name, account type, and account balance of the customer who has the highest credit score. | SELECT cust_name , acc_type , acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1 |
Which classes have more than two captains? | SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2 |
Who has played the most game plays in the 2000-2001 season of the International league? | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.LEAGUE = 'International' ORDER BY T1.GP DESC LIMIT 1 |
Which position does Jesse Boulerice play? | SELECT position FROM table_name_83 WHERE player = "jesse boulerice" |
What is the lowest draw that has We The Lovers for the english translation, with a place greater than 1? | SELECT MIN(draw) FROM table_name_26 WHERE english_translation = "we the lovers" AND place > 1 |
What is the employee id of the head whose department has the least number of employees? | SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1; |
Please show the date of ceremony of the volumes that last more than 2 weeks on top. | SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2 |
Which nations have a boundary with the Kalahari Desert? | SELECT T3.Name FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T1.Name = 'Kalahari' |
How many stores are in weather station 12? | SELECT SUM(store_nbr) FROM relation WHERE station_nbr = 12 |
Name the sum of Laps for lance reventlow with grid more than 16 | SELECT SUM(laps) FROM table_name_56 WHERE driver = "lance reventlow" AND grid > 16 |
What is the roll number for East Gore School? | SELECT COUNT(roll) FROM table_name_21 WHERE name = "east gore school" |
tell me the average roll for the featherston area and integrated authority. | SELECT AVG(roll) FROM table_name_48 WHERE area = "featherston" AND authority = "integrated" |
What is the number of departments in Division "AS"? | SELECT count(*) FROM DEPARTMENT WHERE Division = "AS" |
What are the names of the teachers ordered by ascending age? | SELECT Name FROM teacher ORDER BY Age ASC |
What is the smallest point amount for years prior to 1958 when the class is 350cc? | SELECT MIN(points) FROM table_name_91 WHERE year < 1958 AND class = "350cc" |
What position did the CFL player drafted out of college of toronto in 2007 play? | SELECT position FROM table_name_22 WHERE college = "toronto" |
Show the institution type with the largest number of institutions. | SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
What is the maximum fastest lap speed in the Monaco Grand Prix in 2008? | SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix" |
Show the grape whose white color grapes are used to produce wines? | SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" |
What team is from the United States and plays a guard position for the Grizzlies in 2012? | SELECT school_club_team FROM table_name_70 WHERE nationality = "united states" AND position = "guard" AND years_for_grizzlies = "2012" |
what is the maximum season with byu-usu score being 29–7 | SELECT MAX(season) FROM table_13665809_2 WHERE byu_usu_score = "29–7" |
How many loses corresponded to giving up 714 points? | SELECT lost FROM table_12792876_2 WHERE points_against = "714" |
What is the most gold medals that a team ranked higher than 6, have 1 silver medal, and more than 4 total medals have? | SELECT MAX(gold) FROM table_name_96 WHERE rank < 6 AND silver = 1 AND total > 4 |
What is the marketing region code that has the most drama workshop groups? | SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1 |
What is the total number of products that are in orders with status "Cancelled"? | SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = "Cancelled" |
Name the institutional authority for launch date of october 12, 2004 | SELECT institutional_authority FROM table_name_47 WHERE launch_date = "october 12, 2004" |
Tell me the title of the film in which Sandra Kilmer is one of the actors. | SELECT T3.title FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.first_name = 'SANDRA' AND T2.last_name = 'KILMER' |
What internet explorer has 29.07% for the chrome? | SELECT internet_explorer FROM table_name_91 WHERE chrome = "29.07%" |
How many times did Yuvraj Singh receive the Man of the Match award? | SELECT SUM(CASE WHEN T2.Player_Name = 'Yuvraj Singh' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match |
ok, list out all college name | SELECT cName from College |
What is the end date for Maaroufi? | SELECT ends FROM table_name_59 WHERE name = "maaroufi" |
When the attendance was 24,406 who lost? | SELECT loss FROM table_name_8 WHERE attendance = "24,406" |
What was the result of the April 16 game? | SELECT result FROM table_name_94 WHERE date = "april 16" |
Which set 3 has a Time of 10:00, and a Score of 3–2, and a Total of 113–102? | SELECT set_3 FROM table_name_61 WHERE time = "10:00" AND score = "3–2" AND total = "113–102" |
What's the best average score with a bad score of 15? | SELECT AVG(best_score) FROM table_name_46 WHERE worst_score = 15 |
What is the difference in the number of restaurants that passed and failed the canvass inspection type? | SELECT COUNT(CASE WHEN T2.results = 'Pass' THEN T1.license_no END) - COUNT(CASE WHEN T2.results = 'Fail' THEN T1.license_no END) AS diff FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_type = 'Canvass' AND T1.facility_type = 'Restaurant' |
What is the normal temperature of Abbotsford, British Columbia? | SELECT normal_temperature FROM table_name_8 WHERE city = "abbotsford, british columbia" |
For each location, how many gas stations are there in order? | SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*) |
During which years did the golfer with the total of 289 win? | SELECT year_s__won FROM table_name_42 WHERE total = 289 |
To whom does the employee have to inform that is the sales representative of the French customer? | SELECT T1.reportsTo FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE T2.country = 'France' |
Find the names of all instructors in the Art department who have taught some course and the course id. | SELECT T1.name , T2.course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art' |
In which group of islands is Rinjani Mountain located? | SELECT T1.Islands FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island INNER JOIN mountain AS T3 ON T3.Name = T2.Mountain WHERE T3.Name = 'Rinjani' |
how about by walk? | SELECT T1.Shop_ID FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" |
Return the most frequent result across all musicals. | SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 |
WHAT IS THE OPENING WITH A WORLDWIDE NUMBER OF $559,852,396? | SELECT opening FROM table_name_85 WHERE worldwide = "$559,852,396" |
Please list the titles of all the films that the customer RUTH MARTINEZ has rented. | SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' |
Who is the away team that played home team Perth Wildcats? | SELECT away_team FROM table_name_82 WHERE home_team = "perth wildcats" |
Which ehtinc group consists of 93% muslims? | SELECT ethnic_group FROM table_name_58 WHERE muslims = "93%" |
Who are the members of Bootup Baltimore? | Here are the first names and last names of members of Bootup Baltimore | What are there major's? | SELECT t3.major FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" |
Where is the miss global teen? | SELECT hometown FROM table_1825751_14 WHERE pageant = "Miss Global Teen" |
What is the number of cars with a greater accelerate than the one with the most horsepower? | SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 ); |
Show the student IDs and numbers of friends corresponding to each. | SELECT student_id , count(*) FROM Friend GROUP BY student_id |
What is the 1957 number when the 1955 is smaller than 0.63, and 1952 is larger than 0.22? | SELECT COUNT(1957) FROM table_name_71 WHERE 1955 < 0.63 AND 1952 > 0.22 |
What is the date of the item with a label of Sony BMG, Epic and a Catalog number 5187482? | SELECT date FROM table_name_82 WHERE label = "sony bmg, epic" AND catalog = "5187482" |
In the Y coordinate of image ID 12, how many are 0? | SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE IMG_ID = 12 AND Y = 0 |
Which template type code has most number of templates? | SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 |
What was the attendance during the november 16, 1975 game? | SELECT MAX(attendance) FROM table_name_18 WHERE date = "november 16, 1975" |
Can you tell me the Gold that has the Total larger than 2, and the Bronze smaller than 1? | SELECT gold FROM table_name_50 WHERE total > 2 AND bronze < 1 |
How many paragraphs are there in the longest chapter where Sir Richard Ratcliff appeared? | SELECT MAX(T2.ParagraphNum) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Richard Ratcliff' |
What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets? | SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1 |
What is the Academy Award for the Film Educating Peter? | SELECT academy_award FROM table_name_34 WHERE film = "educating peter" |
How many times did other regions make positive sales in DS platform? | SELECT COUNT(DISTINCT T2.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id WHERE T1.platform_name = 'DS' AND T4.region_name = 'Other' AND T3.num_sales > 0 |
Perfect, thanks for that. Now, how many documents don't have images? | select count ( * ) from ( SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.