sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What date did the project with he 'Lets Share Ideas essay' went live? | SELECT T1.date_posted FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Lets Share Ideas' |
What country do the Winnipeg Jets come from? | SELECT nationality FROM table_2679061_7 WHERE nhl_team = "Winnipeg Jets" |
Who won the race on wednesday, august 27? | SELECT winner FROM table_name_18 WHERE date = "wednesday, august 27" |
The city of Birmingham is what type of location? | SELECT type FROM table_2273738_1 WHERE city = "Birmingham" |
Which two countries have the longest border in the world? Give the full name of the country. | SELECT T2.Country1, T2.Country2 FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 ORDER BY T2.Length DESC LIMIT 1 |
Please list the business IDs of the Yelp_Business that have a business time of longer than 12 hours on Sundays. | SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T1.closing_time + 12 - T1.opening_time > 12 AND T2.day_of_week LIKE 'Sunday' GROUP BY T1.business_id |
What are the details and star ratings of the three hotels with the lowest price ranges? | SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3 |
How many restaurants can you find in Concord? | SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord' |
And how many of them are under age 40? | select count ( * ) from person where age < 40 and gender = 'male' |
Who was the opponent in a week less than 8 on October 9, 1960? | SELECT opponent FROM table_name_24 WHERE week < 8 AND date = "october 9, 1960" |
Please list down the last name of players from "BLB" team. | SELECT T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'BLB' |
What venue did the partnership of herschelle gibbs / justin kemp happen? | SELECT venue FROM table_name_74 WHERE partnerships = "herschelle gibbs / justin kemp" |
Which destination has the least number of flights? | SELECT destination, count ( * ) FROM Flight GROUP BY destination order by count ( * ) LIMIT 1 |
Find the male friend of Alice whose job is a doctor? | SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor' |
What are the average goals for with a drawn higher than 7 and goals against less than 86, as well as more than 11 losses and more than 42 games played? | SELECT AVG(goals_for) FROM table_name_19 WHERE drawn > 7 AND goals_against < 86 AND lost > 11 AND played > 42 |
What are the names of the three nations where the longest river that empties into the Atlantic Ocean stretches to? | SELECT DISTINCT T1.Country FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = ( SELECT Name FROM river WHERE Sea = 'Atlantic Ocean' ORDER BY Length DESC LIMIT 1 ) |
In Week 7, what is the highest attendance number? | SELECT MAX(attendance) FROM table_name_77 WHERE week = 7 |
What clubs are in the evgrapi shevardnadze stadium? | SELECT clubs FROM table_name_17 WHERE stadium = "evgrapi shevardnadze stadium" |
Which position does Loren Woods play? | SELECT position FROM table_10015132_21 WHERE player = "Loren Woods" |
List out full name of patients who have "Diabetic diet" in the description of the care plan. | SELECT DISTINCT T2.first, T2.last FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Diabetic diet' |
What was the date of the series finale for Peru? | SELECT series_finale FROM table_29799700_2 WHERE country = "Peru" |
Compute the mean price of procedures physician John Wen was trained in. | SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" |
WHAT GAME HAD A SCORE OF 99-112? | SELECT game FROM table_name_30 WHERE result = "99-112" |
What is Location, when Circuit is August 16? | SELECT location FROM table_name_1 WHERE circuit = "august 16" |
Which Name had a Rank of 18 Out of a number smaller than 149? | SELECT name FROM table_name_31 WHERE out_of < 149 AND rank = 18 |
List every album whose title starts with A in alphabetical order. | SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title; |
What are the total number of students enrolled in ACCT-211? | SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211' |
When troy is the regular season winner what is the conference tournament? | SELECT conference AS Tournament FROM table_24160890_3 WHERE regular_season_winner = "Troy" |
Name the status for belletti | SELECT status FROM table_name_8 WHERE name = "belletti" |
Find the name and gender of the candidate who got the highest support rate. | SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1 |
Name the result for william j. driver | SELECT result FROM table_1342426_5 WHERE incumbent = "William J. Driver" |
What class had a score of 95.1? | SELECT class FROM table_name_33 WHERE score = 95.1 |
List all of the player ids with a height of at least 180cm and an overall rating higher than 85. | SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85 |
What is the Japanese title for Fantasy? | SELECT japanese_title FROM table_11839306_2 WHERE english_title = "Fantasy" |
What is the address of the customer who filed the most recent complaint? | SELECT t1.address_line_1, t1.address_line_2 FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1 |
Can you show only the name? | SELECT Name FROM WINE WHERE Price > ( SELECT max ( Price ) FROM WINE WHERE YEAR = 2006 ) |
What is Nation, when Date is "2004-07-22"? | SELECT nation FROM table_name_67 WHERE date = "2004-07-22" |
How many purchase in this above the table | SELECT count ( * ) FROM TRANSACTIONS |
Which display has an ISO range of 80-800, and 0.8 Seconds/Frame? | SELECT display FROM table_name_21 WHERE iso_range = "80-800" AND seconds_frame = 0.8 |
Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount. | SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1 |
What is the location of the Saints having 1979- as Years in GFL? | SELECT location FROM table_name_37 WHERE years_in_gfl = "1979-" AND nickname = "saints" |
When the VFL played at Junction Oval what was the away score? | SELECT away_team AS score FROM table_name_15 WHERE venue = "junction oval" |
Show all cities and corresponding number of students. | SELECT city_code , count(*) FROM Student GROUP BY city_code |
What is the proportion of action movies directors who are called 'box office success paradox'? | SELECT CAST(SUM(IIF(T2.avg_revenue > T2.d_quality, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN directors AS T2 ON T1.directorid = T2.directorid WHERE T1.genre = 'Action' |
Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005 |
how many movies are there in total? | SELECT count ( * ) FROM Movie |
who was the Stage winner when the stage was smaller than 16, earlier than 1986, and a distance (km) was 19.6? | SELECT stage AS winner FROM table_name_44 WHERE stage < 16 AND year < 1986 AND distance__km_ = "19.6" |
What are the addresses of the employees? | Do you mean all of the employees? | Yes | SELECT address FROM employees |
Who are the members of the club named "Bootup Baltimore"? Give me their last names. | SELECT t3.lname 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" |
Find the average age of female (sex is F) students who have secretary votes in the spring election cycle. | SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = "F" AND T2.Election_Cycle = "Spring" |
What is the English title for the film directed by George Miller? | SELECT english_title FROM table_name_19 WHERE director = "george miller" |
What is highest rating for the most recent movie and when was it released? | SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie) |
What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s? | SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%"; |
What is the date that the winner driver is Stirling Moss in the race named vi grand prix de caen? | SELECT date FROM table_name_91 WHERE winning_driver = "stirling moss" AND race_name = "vi grand prix de caen" |
What is the Event, when Year is 2002, and when Competition is European Indoor Championships? | SELECT event FROM table_name_6 WHERE year = 2002 AND competition = "european indoor championships" |
Can you show me the total number of phones? | SELECT count ( * ) from phone |
What was the moving that has a free transfer fee, and the nationality of CYP, and winter as the transfer window? | SELECT moving_to FROM table_name_12 WHERE transfer_fee = "free" AND nat = "cyp" AND transfer_window = "winter" |
what is the date (from) where date (to) is 1919? | SELECT date__from_ FROM table_12562214_1 WHERE date__to_ = "1919" |
What is the name of the coach during whose period of coaching, a team has the most numbers of games won in the post-season games? | SELECT coachID FROM coaches ORDER BY post_wins DESC LIMIT 1 |
Which Second has a Skip of barbora vojtusova? | SELECT second FROM table_name_27 WHERE skip = "barbora vojtusova" |
What is the average value of Adolescent fertility rate in the country whose Alpha2Code is 1A? | SELECT CAST(SUM(T2.Value) AS REAL) * 100 / COUNT(T2.Year) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' |
What is the To par of the Player with a Score of 70-71=141? | SELECT AVG(to_par) FROM table_name_58 WHERE score = 70 - 71 = 141 |
Can you show me the credit score of the customer receiving the greatest amount of loan? | SELECT T2.credit_score FROM loan AS T1 JOIN customer AS T2 ON T1.cust_id = T2.cust_id ORDER BY T1.amount DESC limit 1 |
Name the team for oct 30, 1989 | SELECT team__b_ FROM table_1594772_2 WHERE match_date = "Oct 30, 1989" |
How many IRST figures for the show that premiered on Canale 5 (2006)? | SELECT COUNT(irst) FROM table_28803803_1 WHERE original_channel = "Canale 5 (2006)" |
Name the publisher who published the most books. | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1 |
What is the sum of Rebounds, when Team is Aris Thessaloniki, and when Games is greater than 14? | SELECT SUM(rebounds) FROM table_name_56 WHERE team = "aris thessaloniki" AND games > 14 |
What is the name of the journalist who has worked longest? | SELECT name FROM journalist ORDER BY Years_working DESC LIMIT 1 |
which game type has least number of games? | SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count ( * ) ASC LIMIT 1 |
Name the most # of seats won | SELECT MAX(_number_of_seats_won) FROM table_19769687_3 |
What kind of restaurants can be found at "106 E 25th Ave"? | SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 106 AND T2.street_name = 'e 25th ave' |
What shareholders have 0 A shares? | SELECT shareholder_name FROM table_206359_1 WHERE a_shares = 0 |
Among the trains running east, how many trains have at least 4 cars? | SELECT SUM(CASE WHEN T1.direction = 'east' THEN 1 ELSE 0 END)as count FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS carsNum FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T2.carsNum >= 4 |
Which Bronze has a Total smaller than 2, and a Silver larger than 0, and a Gold smaller than 0? | SELECT SUM(bronze) FROM table_name_69 WHERE total < 2 AND silver > 0 AND gold < 0 |
What score has 7-0 as the result? | SELECT score FROM table_name_56 WHERE result = "7-0" |
Who wrote the episode that had 6.05 million U.s. viewers? | SELECT written_by FROM table_28037619_2 WHERE us_viewers__million_ = "6.05" |
What are the names of the heads who are born outside the California state? | SELECT name FROM head WHERE born_state != 'California' |
What was the condition of Elly Koss on 2009/1/8? | SELECT T2.description FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START = '2009-01-08' |
Who took third-place when there were 4 total wins? | SELECT third_place FROM table_17632217_2 WHERE total_wins = 4 |
Among the patients with prediabetes, how many are female? | SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.gender = 'F' AND T1.DESCRIPTION = 'Prediabetes' |
What is the Cyrillic name for Novi Vladimirovac? | SELECT cyrillic_name_other_names FROM table_2562572_56 WHERE settlement = "Novi Vladimirovac" |
Show all game names played by at least 1000 hours. | SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000 |
How many episodes have the star score greater than 8? | SELECT COUNT(DISTINCT episode_id) FROM Vote WHERE stars > 8; |
What is the name of the customer who has been involved in most policies? | SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count ( * ) DESC LIMIT 1 |
what is the name of the product with the characteristic "hot"? | SELECT 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 = "hot" |
List all the cities in the country where there is high life expectancy at birth. | SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.LifeExpectancy DESC LIMIT 1 |
what is the silver when the nation is syria (syr) and gold is more than 0? | SELECT SUM(silver) FROM table_name_38 WHERE nation = "syria (syr)" AND gold > 0 |
can you show me the address of the restaurant with ResID 1? | select address from Restaurant where ResID = 1 |
in december 7 who made the high points | SELECT high_points FROM table_30049462_5 WHERE date = "December 7" |
Find the total number of scientists. | SELECT count(*) FROM scientists |
Find the number of products with category "Spices" and typically sold above 1000. | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 |
What is the party of the politician who left office on January 12, 1857 | SELECT party FROM table_name_47 WHERE left_office = "january 12, 1857" |
List the name of the author that affiliated with University of Illinois Chicago? | SELECT Name FROM Author WHERE Affiliation = 'University of Illinois Chicago' |
What are the student ids for all male students? | SELECT StuID FROM Student WHERE Sex = 'M' |
What was Holly Scouler's total votes | SELECT total_votes FROM table_name_62 WHERE members = "holly scouler" |
Which exaltation has a detriment of Saturn and Cancer as a sign? | SELECT exaltation FROM table_name_75 WHERE detriment = "saturn" AND sign = "cancer" |
What Goals with a Level of 5 or greater is the lowest? | SELECT MIN(goals) FROM table_name_95 WHERE level > 5 |
For each constructor id, how many races are there? | SELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid |
Which Opponents have a Score of 6–4, 6–3? | SELECT opponents FROM table_name_59 WHERE score = "6–4, 6–3" |
When was Emily Wood hired? Mention her position and salary. | SELECT T1.hiredate, T2.positiontitle, T1.salary FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.