sentence
stringlengths
3
347
sql
stringlengths
18
804
can you show a list of customer address?
SELECT customer_address FROM customers
How many staff have the first name Ludie?
SELECT count(*) FROM Staff WHERE first_name = "Ludie";
What is the average total with a nation of thailand with a gold smaller than 17?
SELECT AVG(total) FROM table_name_54 WHERE nation = "thailand" AND gold < 17
What is the name and salary for employee with id 242518965?
SELECT name , salary FROM Employee WHERE eid = 242518965
What's listed for the Station Code that has the Arrival of 02:20?
SELECT station_code FROM table_name_40 WHERE arrival = "02:20"
How many distinct currency codes are there for all drama workshop groups?
SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups
How many students are 18 years old?
SELECT count(*) FROM Student WHERE age = 18
Where was Collingwood's away game played?
SELECT venue FROM table_name_3 WHERE away_team = "collingwood"
What are the service details of thing id 2?
select service_details from things where thing_id = 2
Where does the judge whose court is in Groton reside?
SELECT judges_residence FROM table_26758262_1 WHERE location_of_court = "Groton"
In what Year was the Position 11th?
SELECT COUNT(year) FROM table_name_80 WHERE position = "11th"
What is the smallest amount of points had a lost number of 2 when the position was less than 1?
SELECT MIN(points) FROM table_name_67 WHERE lost = 2 AND position < 1
Among the professors with more than average teaching ability, list the full name and email address of the professors who advise two or more students.
SELECT T2.first_name, T2.last_name, T2.email FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability > ( SELECT AVG(teachingability) FROM prof ) GROUP BY T2.prof_id HAVING COUNT(T1.student_id) >= 2
How many dorms have amenities?
SELECT count(DISTINCT dormid) FROM has_amenity
Give the names and locations of all wrestlers.
SELECT Name , LOCATION FROM wrestler
What is the patient's name in room 111?
SELECT T1.Name FROM Stay as T4 Join Patient as T1 where T4.Patient = T1.SSN and T4.Room = 111
Which Venue has Against of 25?
SELECT venue FROM table_name_89 WHERE against = 25
Name the total number of date for l 85–86 (ot)
SELECT COUNT(date) FROM table_22654073_6 WHERE score = "L 85–86 (OT)"
When was the Hon Ian Causley first elected?
SELECT first_elected FROM table_name_66 WHERE member = "hon ian causley"
Where is Fred Haas from?
SELECT country FROM table_name_93 WHERE player = "fred haas"
What is the election year of the president with a Birth State of lost connecticut?
SELECT AVG(election_year) FROM table_name_61 WHERE birth_state = "lost connecticut"
What record has November 15 as the date?
SELECT record FROM table_name_32 WHERE date = "november 15"
Which Pop/Area (1/km²) has a No P. larger than 1, and a Name of albergaria-a-velha?
SELECT AVG(pop_area__1_km²_) FROM table_name_84 WHERE no_p > 1 AND name = "albergaria-a-velha"
What are the distinct salaries of all instructors who earned less than the maximum salary?
SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT max(salary) FROM instructor)
When nº is 3, what are all the coaliton parties?
SELECT coalition_parties FROM table_21422977_1 WHERE nº = 3
How many reviews are created for the podcast "Scaling Global" under?
SELECT COUNT(T2.content) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Scaling Global'
What was the attendance that had a loss of Ponson (1-5)?
SELECT attendance FROM table_name_58 WHERE loss = "ponson (1-5)"
What format has 080 360-2 as the catalog?
SELECT format FROM table_name_84 WHERE catalog = "080 360-2"
When @ new orleans is the team who has the highest amount of rebounds?
SELECT high_rebounds FROM table_17288825_6 WHERE team = "@ New Orleans"
What is the award for 1998 with Representative Work of city beat?
SELECT award FROM table_name_78 WHERE year = 1998 AND representative_work = "city beat"
Find the person who has exactly one friend.
SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1
How many different apartment building are there?
SELECT count ( DISTINCT building_id ) FROM apartment_buildings
WHich country had the most competitions?
SELECT country FROM competition GROUP BY country ORDER BY COUNT ( * ) DESC LIMIT 1
What is the production code for the episode that had 9.18 million viewers (U.S.)?
SELECT MAX(production_code) FROM table_21550897_1 WHERE us_viewers__million_ = "9.18"
How many matches have Mumbai Indians won?
SELECT SUM(CASE WHEN T2.Team_Name = 'Mumbai Indians' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Match_Winner
what are the last names of the teachers who teach grade 5?
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5
What are the names of players who have the best dribbling?
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = ( SELECT max(overall_rating) FROM Player_Attributes)
What is the lowest gold medals of a rank 12 team?
SELECT MIN(gold) FROM table_name_81 WHERE rank = "12"
what is the number of teams where the record is 0-1
SELECT COUNT(amman) FROM table_26173058_2 WHERE wehdat = "0-1"
can you show me the oldest one?
SELECT Name FROM people ORDER BY Age DESC LIMIT 1
What is the number of staff living in Georgia?
SELECT count ( * ) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county ORDER BY count ( * ) DESC LIMIT 1
Which Opponent has a Week larger than 2 on november 19, 1995?
SELECT opponent FROM table_name_81 WHERE week > 2 AND date = "november 19, 1995"
What is the record for opponent Anna Barone?
SELECT record FROM table_name_24 WHERE opponent = "anna barone"
How many games were released in 1981?
SELECT COUNT(T.id) FROM game_platform AS T WHERE T.release_year = 1981
what was the score of the parallel bars with a floor exercise score more than 9.137, vault more than 9.5 and horizontal bar of 9.225?
SELECT SUM(parallel_bars) FROM table_name_87 WHERE floor_exercise > 9.137 AND horizontal_bar = 9.225 AND vault > 9.5
What was the intermediate sprint classification for the race whose winner was Daniel Martin?
SELECT intermediate_sprints_classification_klasyfikacja_najaktywniejszych FROM table_28092844_16 WHERE winner = "Daniel Martin"
What is the lowest number of laps obtained by driver Nick Heidfeld?
SELECT MIN(laps) FROM table_name_32 WHERE driver = "nick heidfeld"
ok,let show me the average unit price of all genre id
SELECT genre_id,avg ( unit_price ) from tracks group by genre_id
What is the round for Arizona with a pick over 100?
SELECT AVG(round) FROM table_name_48 WHERE school = "arizona" AND pick > 100
What was South Melbourne's score as the home team?
SELECT home_team AS score FROM table_name_19 WHERE home_team = "south melbourne"
What City had Results¹ of 1:2?
SELECT city FROM table_name_39 WHERE results¹ = "1:2"
What is the number of different class sections offered in the course ACCT-211?
SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'
How many years was the chassis a Coloni C3?
SELECT COUNT(year) FROM table_name_51 WHERE chassis = "coloni c3"
What is the total number of losses with less than 73 goals for, less than 11 wins, more than 24 points, and a position greater than 15?
SELECT COUNT(losses) FROM table_name_54 WHERE goals_for < 73 AND wins < 11 AND points > 24 AND position > 15
How many assets does each third party company supply? | Here is the result table of third-party companies and the number of ASSETS they held. For EXAMPLE, COMPANY 1 HELD 1 ASSET. | How many total assets are there?
SELECT count ( * ) FROM assets
What are the numbers of races for each constructor id?
SELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid
What is the public when the vote percentage is 16.0%
SELECT public FROM table_26375386_20 WHERE vote_percentage = "16.0%"
Which of those residences have both male and female players?
SELECT Residence FROM player where gender = "M" intersect SELECT Residence FROM player where gender = "F"
How many drivers did not participate in the races held in 2009?
SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
Of all the countries of the Hindu religion, which has the lowest ratio of people per square meter of surface?
SELECT T1.Name FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Hindu' ORDER BY T1.Population / T1.Area ASC LIMIT 1
Among all goals scored by Calgary Hitmen in the 2007-2008 season, identify the percentage scored by Ian Schultz.
SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Ian Schultz' THEN T1.G ELSE 0 END) AS REAL) * 100 / SUM(T1.G) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.TEAM = 'Calgary Hitmen'
List out the time of the event id 12.
SELECT timestamp FROM events WHERE event_id = 12
How about names of not assigned projects?
SELECT Name FROM Projects WHERE Code NOT IN ( SELECT Project FROM AssignedTo )
What is the highest attendance of the match with a 2:0 score and vida as the away team?
SELECT MAX(attendance) FROM table_name_59 WHERE score = "2:0" AND away = "vida"
Count the number of services.
SELECT count(*) FROM services
Show names for artists without any exhibition.
SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition)
What was the attendance of the bowl game in Gainesville, Fl?
SELECT attendance FROM table_15190346_2 WHERE location = "Gainesville, FL"
which builder has the highest total points? | Do you want their name or id? | their name please
SELECT T2.name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1
Tell the Id number of the business with the most number of violations.
SELECT business_id FROM violations GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1
What is the country that has the most perpetrators?
SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
How many runs when bangladesh was the fielding team?
SELECT runs FROM table_1670921_2 WHERE fielding_team = "Bangladesh"
How many players were included in the Hall of Fame on average between 1950 and 1980?
SELECT CAST(COUNT(name) AS REAL) / 30 FROM HOF WHERE year BETWEEN 1950 AND 1980 AND category = 'Player'
Which DOB has Bats of s, and a Position of inf?
SELECT dob FROM table_name_8 WHERE bats = "s" AND position = "inf"
When they were 2-32 what did they score?
SELECT score FROM table_name_71 WHERE record = "2-32"
Which Elevator has a Title of bishop of palestrina?
SELECT elevator FROM table_name_29 WHERE title = "bishop of palestrina"
How many matches were played in the Scottish Premiership division from 2006 to 2008?
SELECT COUNT(T1.Div) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Scottish Premiership' AND (T1.season BETWEEN 2006 AND 2008)
Out of these names, which names contain the letter a?
SELECT Fname FROM STUDENT WHERE Fname LIKE "%a%"
What is the result of the February 24, 2010 inspection involving the employee named "Arnold Holder"?
SELECT DISTINCT T2.results FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_date = '2010-02-24' AND T1.first_name = 'Arnold' AND T1.last_name = 'Holder'
Which School name has students smaller than 389, and grades of 10-12?
SELECT school_name FROM table_name_64 WHERE students < 389 AND grades = "10-12"
Who was the Democratic incumbent in the South Carolina 5 District?
SELECT incumbent FROM table_name_84 WHERE party = "democratic" AND district = "south carolina 5"
What's the greatest losses for those with more than 13 wins?
SELECT MAX(losses) FROM table_name_20 WHERE wins > 13
What is Builder, when Date is 1953?
SELECT builder FROM table_name_71 WHERE date = "1953"
What are the order dates of orders with 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 is the maximum fastest lap speed in race named '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"
HOw many top 5 starts did the team with an average start of 17.7 have?
SELECT COUNT(top_5) FROM table_1929755_1 WHERE avg_start = "17.7"
How about for the supplier who supplies the least products? | Did you want to get the supplier id who supplies the least products? | I want the average amount purchased and value purchased for the supplier who supplies the least products
SELECT avg ( total_amount_purchased ) , avg ( total_value_purchased ) FROM Product_Suppliers WHERE supplier_id = ( SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count ( * ) LIMIT 1 )
Who is the manager of the St. Johnstone club?
SELECT manager FROM table_name_53 WHERE club = "st. johnstone"
How many models does each car maker produce? List maker full name, id and the number.
SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;
Which SR number had a wheel arrangement of 0-6-0t, the year made was more recent than 1874, and the year withdrawn was 1963?
SELECT sr_no FROM table_name_87 WHERE wheel_arrangement = "0-6-0t" AND year_made > 1874 AND year_withdrawn = 1963
What is the average wins of a team with more than 0 ples and less than 3 podiums?
SELECT AVG(wins) FROM table_name_12 WHERE poles > 0 AND podiums < 3
What is the End of term of the President with an Age at inauguration of 78years, 160days?
SELECT end_of_term FROM table_name_89 WHERE age_at_inauguration = "78years, 160days"
What is the average number of bronze medals won by Poland?
SELECT AVG(bronze) FROM table_name_67 WHERE nation = "poland"
How many invested in the school with mascot Falcons?
SELECT Invested FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE t1.mascot = "Falcons"
Find each target user's name and average trust score.
SELECT T1.name , avg(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id
What is the ID of the item that sold the best on the day with the highest max temperature in store no.3 in 2012?
SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' AND tmax = ( SELECT MAX(tmax) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' ) GROUP BY T1.item_nbr ORDER BY SUM(units) DESC LIMIT 1
Name the outcome for opponents of jonas björkman john mcenroe
SELECT outcome FROM table_name_60 WHERE opponents_in_the_final = "jonas björkman john mcenroe"
With 1.97 million HK viewers and a finale more than 33, what was the total number of peaks?
SELECT COUNT(peak) FROM table_name_16 WHERE hk_viewers = "1.97 million" AND finale > 33
What is the record of the game with a score of 1 – 5?
SELECT record FROM table_name_39 WHERE score = "1 – 5"
List the distinct carriers of phones with memories bigger than 32.
SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32
What is the name of the race when Lineth Chepkurui is the athlete?
SELECT race FROM table_name_17 WHERE athlete = "lineth chepkurui"