sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What venue has an against over 14, an opposing team of scotland, and a status of five nations? | SELECT venue FROM table_name_16 WHERE against > 14 AND opposing_teams = "scotland" AND status = "five nations" |
How many games feature hawthorn as the away squad? | SELECT COUNT(crowd) FROM table_name_8 WHERE away_team = "hawthorn" |
Could you order them by order quantity? | From small to large? | large to small | SELECT * FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY sum ( order_quantity ) DESC |
Find the ward office's address and phone number of the ward where the most crimes without arrest occurred. | SELECT T2.ward_office_address, T2.ward_office_phone FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.arrest = 'FALSE' GROUP BY T2.ward_office_address, T2.ward_office_phone ORDER BY COUNT(T1.arrest) DESC LIMIT 1 |
Which Attendance is the highest one that has a Record of 15-28? | SELECT MAX(attendance) FROM table_name_24 WHERE record = "15-28" |
How many points did landskrona bois get when they were ranked below 18? | SELECT COUNT(points) FROM table_name_68 WHERE club = "landskrona bois" AND rank < 18 |
What is the home team's score at corio oval? | SELECT home_team AS score FROM table_name_66 WHERE venue = "corio oval" |
What of instructors? | SELECT count ( * ) FROM Faculty WHERE Rank = "Instructor" AND building = "NEB" |
Eduardo Martins is a customer at which company? | SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins"; |
How many camera lenses have a focal length longer than 15 mm? | SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15 |
What is the scrap reason for work order "57788"? | SELECT T2.Name FROM WorkOrder AS T1 INNER JOIN ScrapReason AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.WorkOrderID = 57788 |
What is the 3rd Liga from 2010-11? | SELECT 3 AS rd_liga_3rd FROM table_name_41 WHERE date = "2010-11" |
For the rides that started at Market at 10th station and ended at South Van Ness at Market station in August of 2013, which day had the coldest temperature? | SELECT T1.start_date FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T2.date LIKE '8/%/2013' AND T1.start_station_name = 'Market at 10th' AND T1.end_station_name = 'South Van Ness at Market' AND T2.min_temperature_f = ( SELECT MIN(T2.min_temperature_f) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T2.date LIKE '8/%/2013' AND T1.start_station_name = 'Market at 10th' AND T1.end_station_name = 'South Van Ness at Market' ) |
What are the distinct names of wines that have appellations in the North Coast area? | SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" |
Show the average age for male and female students. | SELECT avg(age) , sex FROM Student GROUP BY sex |
Among all the customers, what is the percentage of the customer's nation being Germany? | SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey |
what is the city of new jersey | SELECT city from Addresses where state_province_county = "NewJersey" |
What place was the golfer with a score of 67-67-66-68=268 ranked in? | SELECT place FROM table_name_62 WHERE score = 67 - 67 - 66 - 68 = 268 |
What is the time of elimination for the wrestler with the most 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 all the school years where class AAAA is in Gregory-Portland? | SELECT school_year FROM table_14603212_5 WHERE class_aAAA = Gregory - Portland |
How many people were not born in Connecticut, USA? | SELECT COUNT(name) FROM Person WHERE birth_region != 'Connecticut' AND birth_country != 'USA'; |
How many bronzes had a rank of 10 and 0 gold? | SELECT SUM(bronze) FROM table_name_9 WHERE rank = "10" AND gold < 0 |
Which cyclist has UCI ProTour points of 40? | SELECT cyclist FROM table_name_96 WHERE uci_protour_points = 40 |
Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate. | SELECT T2.name, T2.distance FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5 |
Find the first names that are used for professionals or owners but are not used as dog names. | SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs |
When was the delevery date when there were 12 ways of delivery? | SELECT 1 AS st_ship_delivery_date FROM table_11552751_2 WHERE total_number_of_ways = "12 ways" |
What is the name of the school in Lucas ? | SELECT location FROM table_25987797_1 WHERE school = "Lucas" |
What is the year that has a character named Wu Ji Wei (無極威)? | SELECT AVG(year) FROM table_name_27 WHERE character = "wu ji wei (無極威)" |
How many type catagories are listed when the percentage of yes is 68.91%? | SELECT COUNT(type) FROM table_256286_61 WHERE _percentage_yes = "68.91%" |
What is part 1 of the verb in class 4 | SELECT part_3 FROM table_1745843_10 WHERE class = "4" |
What are the order IDs and details? | SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count ( * ) > 2 |
Find the first and last name of all the teachers that teach EVELINA BROMLEY. | SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "EVELINA" AND T1.lastname = "BROMLEY" |
How much Burnley has a Fylde smaller than 1, and a Rossendale larger than 0? | SELECT SUM(burnley) FROM table_name_97 WHERE fylde < 1 AND rossendale > 0 |
Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings) |
Which is the station where no bike could not be borrowed form on the 2013/11/03 02:01:01? State the location of the station. | SELECT T1.name, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/11/03 02:01:01' AND T2.bikes_available = 0 |
Which people severed as comptroller most frequently? Give me the name of the person and the frequency count. | SELECT Comptroller , COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1 |
Name the number of high assists for july 1 | SELECT COUNT(high_assists) FROM table_17103645_10 WHERE date = "July 1" |
Please indicate the product name of Tokyo Traders company with order quantity greater than 40. | SELECT DISTINCT T2.ProductName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID WHERE T1.CompanyName = 'Tokyo Traders' AND T3.Quantity > 40 |
What is the note for Australia on the indicator SP.ADO.TFRT? | SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SP.ADO.TFRT' AND T1.ShortName = 'Australia' |
What is the form of government that the city of Manila has? | SELECT T1.GovernmentForm FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Manila' |
What are the full names of customers who have accounts? | SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id |
What driver has 22 as nor 1? | SELECT driver FROM table_name_85 WHERE nor_1 = "22" |
Please show me all customers and their contact channels | Do you want the names of customers or id? | names please | SELECT DISTINCT customer_name, channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id |
What was the surface in 1981? | SELECT surface FROM table_name_56 WHERE date = 1981 |
How many events had participants whose details had the substring 'Dr.' | SELECT count(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%' |
Name the length for stage of ss6 | SELECT length FROM table_name_41 WHERE stage = "ss6" |
Which districts have at least two addresses? | SELECT district FROM address GROUP BY district HAVING count(*) >= 2 |
When persikos sorong city played in group 11, who played in group 7? | SELECT group_7 FROM table_19523142_5 WHERE group_11 = "Persikos Sorong City" |
What are the dates in which the mean sea level pressure was between 30.3 and 31? | SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 |
How many orders were made by the customers in Ireland. | SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Country = 'Ireland' |
How many powiats have mstsislaw as a capital? | SELECT number_of_powiats FROM table_1784514_1 WHERE capital = "Mstsislaw" |
What is Gene Sauers' to par? | SELECT to_par FROM table_name_28 WHERE player = "gene sauers" |
When Diane Deluna was the cyber girl in week 4 who was the cyber girl in week 2? | SELECT week_2 FROM table_name_90 WHERE week_4 = "diane deluna" |
What is the name when the country is ESP and the transfer fee is € 7m? | SELECT name FROM table_name_20 WHERE country = "esp" AND transfer_fee = "€ 7m" |
What is the category for the "Moist Boys" podcast? | SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Moist Boys' ) |
Okay, and what genre does Michel prefer? | SELECT preferred_genre FROM artist WHERE artist_name = "Michel" |
Which genre contains the greatest number of non-English films? | SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.isEnglish = 'F' GROUP BY T2.genre ORDER BY COUNT(T1.movieid) DESC LIMIT 1 |
list out the projects names | SELECT name FROM projects |
Please list three types of film along with their IDs and the latest update. | SELECT DISTINCT name, category_id, last_update FROM category LIMIT 3 |
Which Bronze has a Silver smaller than 1, and a Total larger than 3? | SELECT AVG(bronze) FROM table_name_94 WHERE silver < 1 AND total > 3 |
Which film has the longest duration? | SELECT title FROM film WHERE length = ( SELECT MAX(length) FROM film ) |
How many million u.s. Viewers watched season 1? | SELECT us_viewers__in_millions_ FROM table_19188562_2 WHERE season = 1 |
Which team names have 44.5 for tumbling? | SELECT team_name FROM table_22014431_3 WHERE tumbling = "44.5" |
Which is Business Entity ID No.13626's phone number type? | SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 USING (PhoneNumberTypeID) WHERE T1.BusinessEntityID = 13626 |
How many customers are in the automobile market segment? | SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE' |
When the game is listed as 2, what is the score? | SELECT score FROM table_name_81 WHERE game = 2 |
What are the personal names and family names of the students? Sort the result in alphabetical order of the family name. | SELECT personal_name , family_name FROM Students ORDER BY family_name |
Who had a rank more than 48, and a last in 2005? | SELECT name FROM table_name_16 WHERE rank > 48 AND last = 2005 |
How many lanes have a rank greater than 8? | SELECT SUM(lane) FROM table_name_25 WHERE rank > 8 |
List the wheels and locations of the railways. | SELECT Wheels , LOCATION FROM railway |
Show names for all stadiums except for stadiums having a concert in year 2014. | SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014 |
What is the Date of the Fifa World Cup with a Score of 1-0? | SELECT date FROM table_name_15 WHERE score = "1-0" AND competition = "fifa world cup" |
How many users lived in Canada according to 2018's survey? | SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2018 AND T1.questiontext = 'What country do you live in?' AND T2.AnswerText = 'Canada' |
Name the high points for the date of november 24 | SELECT high_points FROM table_17323529_5 WHERE date = "November 24" |
What is the name and sex of the candidate with 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 |
Which Country has a Finish of t32, and a Year(s) won of 1996? | SELECT country FROM table_name_19 WHERE finish = "t32" AND year_s__won = "1996" |
How many gold medals for the nation ranked 6? | SELECT gold FROM table_name_19 WHERE rank = "6" |
What about the city with least customers? | SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count ( * ) LIMIT 1 |
Which major has the highest number of students? | SELECT major FROM Student GROUP BY major ORDER BY count ( * ) DESC LIMIT 1 |
How many neighborhoods are there in the community area of Lincoln Square? | SELECT COUNT(T3.community_area_no) FROM ( SELECT T1.community_area_no FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE community_area_name = 'Lincoln Square' GROUP BY T1.community_area_no ) T3 |
List each charge type and its amount. | SELECT charge_type , charge_amount FROM Charges |
How many rounds have a chassis of thl2? | SELECT rounds FROM table_name_87 WHERE chassis = "thl2" |
What are the dates when customers with ids between 10 and 20 became customers? | SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 |
Is there any coach who has not been a player before but has won award? State the ID. | SELECT DISTINCT T2.coachID FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.playerID IS NULL |
yes | What information do you want to know about each gender? | which coach gender is much? | SELECT Coach_name FROM coach WHERE Gender = "M" |
Can you show me all the addresses with cities? | Did you mean the address content? | Yes, and also the cities. | SELECT address_content,city FROM addresses |
What are the opening hours of those attractions? | SELECT T1.Opening_Hours FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count ( * ) = 1 |
What is Home Team, when Date is "6 December 1986", and when Tie No is "4"? | SELECT home_team FROM table_name_49 WHERE date = "6 december 1986" AND tie_no = "4" |
What is the name of browser with id 1? | select name from browser where id = 1 |
what is the least silver when overall is less than 67, team is saami and gold is less than 5? | SELECT MIN(silver) FROM table_name_2 WHERE overall < 67 AND team = "saami" AND gold < 5 |
At what venue was South Melbourne the home team? | SELECT venue FROM table_name_87 WHERE home_team = "south melbourne" |
What are the countries for each market ordered by decreasing number of cities? | SELECT Country FROM market ORDER BY Number_cities DESC |
What was the result and score of Game #29? | SELECT score FROM table_11964047_6 WHERE _number = 29 |
What are the title and issues of the books? | SELECT Title, Issues FROM book |
What period was the life expectancy at 62.4? | SELECT period FROM table_27434_2 WHERE life_expectancy_total = "62.4" |
What is the order price of the book "The Servant Leader" in 2003? | SELECT T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Servant Leader' AND STRFTIME('%Y', T1.publication_date) = '2003' |
Return the birth date of the poker player with the lowest earnings. | SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1 |
Which School has a Year Left of 1966, and a Mascot of indians? | SELECT school FROM table_name_8 WHERE year_left = 1966 AND mascot = "indians" |
What's the show that has 60 minutes as the news freq? | SELECT show_name FROM table_name_25 WHERE news_freq = "60 minutes" |
What tournament had a black of Kramnik and an opening of B66 Sicilian Defence? | SELECT tournament FROM table_name_28 WHERE black = "kramnik" AND opening = "b66 sicilian defence" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.