sentence
stringlengths
3
347
sql
stringlengths
18
804
Which Loss is the lowest one that has an Avg/G of 3.5, and a Gain smaller than 42?
SELECT MIN(loss) FROM table_name_83 WHERE avg_g = 3.5 AND gain < 42
What percentage of consumers from Houston disputed complaints?
SELECT CAST(SUM(CASE WHEN T2.`Consumer disputed?` = 'Yes' AND T1.city = 'Houston' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID
From where did Train No. 15929/30 originate?
SELECT origin FROM table_name_15 WHERE train_no = "15929/30"
What nation has 0 as the silver, 1 as the bronze, with 18 as the rank?
SELECT nation FROM table_name_84 WHERE silver = 0 AND bronze = 1 AND rank = "18"
Can you list all the schools that have less than 5 different departments? | BUS is the school code for schools with less than 5 different departments. | Can you list the number of departments with school code BUS?
SELECT count ( DISTINCT dept_name ) FROM department where school_code = "BUS"
what's the monday time with tuesday being 9:00-6:00
SELECT monday FROM table_11019212_1 WHERE tuesday = "9:00-6:00"
How many different orders with a total price greater than 4000 are cancelled?
SELECT COUNT(DISTINCT T1.orderNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.quantityOrdered * T1.priceEach > 4000 AND T2.status = 'Cancelled'
what is the status of Perth-Andover | The status of the city with official name Perth-Andover is Village. | what is the name of the city that is top in area km 2.
SELECT Official_Name FROM city order by Area_km_2 desc limit 1
Under what events was the menu page's full width less than 2000 mm?
SELECT T1.event FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.full_width = 2000
Name the kurdistan democratic party for kurdistan list being 10
SELECT MIN(kurdistan_democratic_party) FROM table_24440361_1 WHERE total_kurdistan_list = 10
Name the number of series for 19
SELECT no_by_series FROM table_23958944_6 WHERE no_by_season = 19
Constructor with total time of 2:45.416
SELECT constructor FROM table_name_72 WHERE q1 + q2_time = "2:45.416"
Provide the number of Yelp businesses in "Gilbert" which got a" high" review count.
SELECT COUNT(business_id) FROM Business WHERE review_count = 'High' AND city = 'Gilbert'
Among all the patients who once had cystitis, what was the percentage of them being married?
SELECT CAST(SUM(CASE WHEN T1.marital = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.description = 'Cystitis'
What AP increase has an AP duration of 0.75?
SELECT ap_increase__mv_ FROM table_name_68 WHERE ap_duration__ms_ = "0.75"
How many results for minimum first elected incumbent Noble Jones Gregory?
SELECT MIN(first_elected) FROM table_1342198_17 WHERE incumbent = "Noble Jones Gregory"
List the id of the player who won the Orange Cap for 2 consecutive seasons.
SELECT Orange_Cap FROM Season GROUP BY Orange_Cap HAVING COUNT(Season_Year) > 1
Among the players that weigh more than 90 kg, how many of them have a position of defense?
SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.position_info = 'D'
Who is the incumbent in district Texas 15?
SELECT incumbent FROM table_1341707_45 WHERE district = "Texas 15"
How much did the project that teacher "822b7b8768c17456fdce78b65abcc18e" created donate?
SELECT T2.donation_total FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'
Which team is located in Leicester?
SELECT team FROM table_name_36 WHERE location = "leicester"
Find the dates of orders which belong to the customer named "Jeramie".
SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
For students who have pets , how many pets does each student have ? list their ids instead of names .
SELECT COUNT(*), t1.stuid FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid GROUP BY t1.stuid
What are the names of the directors who made exactly one movie excluding director NULL?
SELECT director FROM Movie WHERE director <> "null" GROUP BY director HAVING COUNT(*) = 1
How many professors attained either Ph.D. or Masters degrees?
SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'
What is the title of corpus with most words?
SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM pages )
Name the kaz hayashi with block A of Shuji Kondo
SELECT kaz_hayashi FROM table_name_47 WHERE block_a = "shuji kondo"
What's the number of decimal digits when the total bits is more than 32 and the exponent is less than 15?
SELECT number_of_decimal_digits FROM table_name_26 WHERE total_bits > 32 AND exponent < 15
How many totals have 0 as Gold, a bronze greater than 1, and a silver less than 1?
SELECT COUNT(total) FROM table_name_94 WHERE gold = 0 AND bronze > 1 AND silver < 1
What is the earliest game that had 42,707 attending?
SELECT MIN(game) FROM table_name_94 WHERE attendance = 42 OFFSET 707
What are the first names of all professors who teach more than one class?
SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING count(*) > 1
What are the ids and details of all accounts?
SELECT account_id , account_details FROM Accounts
Find all the store names in the district with the lowest population.
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = ( SELECT district_id FROM district ORDER BY city_population ASC LIMIT 1 )
What's Kaia Kanepi's Sd?
SELECT MIN(sd) FROM table_27615896_20 WHERE player = "Kaia Kanepi"
Who is the drive for an Entrant of Scuderia Ambrosiana?
SELECT driver FROM table_name_65 WHERE entrant = "scuderia ambrosiana"
What is the density (hab/km²) with a population censo 2007(hab) of 336.293*?
SELECT density__hab__km²__ FROM table_name_4 WHERE population_censo_2007_hab_ = "336.293*"
Find the names of stadiums which have never had any event.
SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)
What is the home team of Lake Oval?
SELECT home_team FROM table_name_21 WHERE venue = "lake oval"
List all the room names booked with 1 adult and their check in date.
SELECT T2.roomName, T1.Checkin FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Adults = 1
What was the entrant in round 16 were Ferrari was the constructor?
SELECT entrant FROM table_name_70 WHERE rounds = "16" AND constructor = "ferrari"
what is the average of high speed? | Did you mean to ask for the average max speed of the storms? | yes
SELECT AVG ( Max_speed ) FROM storm
Find the author for each submission and list them in ascending order of submission score.
SELECT Author FROM submission ORDER BY Scores ASC
How many owners temporarily do not have any dogs?
SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )
What is the description of the club "Pen and Paper Gaming"?
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
How many Bangladeshis were admitted when 714 Nepalis and 13,575 Pakistanis were admitted?
SELECT AVG(bangladeshis_admitted) FROM table_name_23 WHERE nepalis_admitted = 714 AND pakistanis_admitted > 13 OFFSET 575
What is the number of Mike Thomas?
SELECT COUNT(position) FROM table_20860739_1 WHERE player = "Mike Thomas"
What is the number of laps for Grid 14?
SELECT COUNT(laps) FROM table_name_88 WHERE grid = 14
What is the score for the game with the record of 3–12?
SELECT score FROM table_27698941_6 WHERE record = "3–12"
In 2007, which job position was hired the most?
SELECT JobTitle FROM Employee WHERE STRFTIME('%Y', HireDate) = '2007' GROUP BY HireDate ORDER BY COUNT(JobTitle) DESC LIMIT 1
What group a winner was for nocerina?
SELECT group_a_winner FROM table_1137142_1 WHERE group_d_winner = "Nocerina"
Show different locations and the number of performances at each location.
SELECT LOCATION , COUNT(*) FROM performance GROUP BY LOCATION
What surface was used on may 13, 2007?
SELECT surface FROM table_name_19 WHERE date = "may 13, 2007"
display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.
SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "null" OR department_id != 40
How many points have a percentage of possible points of 67.22%?
SELECT SUM(points) FROM table_name_92 WHERE percentage_of_possible_points = "67.22%"
What are the memories and carriers of phones?
SELECT Memory_in_G , Carrier FROM phone
Name the year for les portes tournantes
SELECT year__ceremony_ FROM table_17025328_1 WHERE original_title = "Les portes tournantes"
Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.
SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10
What message has hd 186408 as a designation HD?
SELECT message FROM table_name_75 WHERE designation_hd = "hd 186408"
How many 1 star ratings are there in the worst rated episode of the season?
SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 1 ORDER BY T1.rating LIMIT 1;
Which semeseter and year had the fewest students?
SELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1
Who are the suppliers of the discontinued products?
SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1
Which Away team plays at the Venue vfl park?
SELECT away_team FROM table_name_91 WHERE venue = "vfl park"
Please name three communities that experience the fraud incident.
SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Criminal Sexual Assault' LIMIT 3
What are the names of all the people who worked on episode 19 of season 9?
SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.episode = 19 AND T1.season = 9
What is the result on Sunday that's सोमवार somavār on Monday and मंगलवार mangalavār on Tuesday?
SELECT sunday_surya__the_sun_ FROM table_name_29 WHERE monday_soma__the_moon_ = "सोमवार somavār" AND tuesday_mangala__mars_ = "मंगलवार mangalavār"
What's the latest keynote version of version 2.3 of numbers with pages greater than 4.3?
SELECT MAX(keynote_version) FROM table_name_18 WHERE numbers_version = "2.3" AND pages_version > 4.3
What is Score, when Player is "Ernie Els"?
SELECT score FROM table_name_15 WHERE player = "ernie els"
How many episodes are numbered 4 in the season?
SELECT COUNT(patient_portrayer) FROM table_26561506_1 WHERE _number = 4
How many photos use Olympus camera lenses?
SELECT count ( * ) FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id WHERE T2.brand = 'Olympus'
Find the names of swimmers who has a result of "win".
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'
What are the names of all games played by Linda Smith?
SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda"
Give the id of the weather station with most stores.
SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(station_nbr) DESC LIMIT 1
What are their names?
select Name from artist
Name the awardee for best editing
SELECT awardee_s_ FROM table_24446718_7 WHERE name_of_award = "Best Editing"
How many distinct courses are enrolled in by students?
SELECT COUNT(course_id) FROM Student_Course_Enrolment
Time ( ET ) of 1:00pm, and a Result of w 34–14 has what record?
SELECT record FROM table_name_67 WHERE time___et__ = "1:00pm" AND result = "w 34–14"
What is the fewest number of races Pedro Nunes completed in any series?
SELECT MIN(races) FROM table_25386974_1
And the lowest?
SELECT stars FROM Rating ORDER BY stars aSC LIMIT 1
What is the airport name for airport 'AKO'?
SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO"
In which regions are there no pizza restaurants?
SELECT DISTINCT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'pizza' AND T2.region != 'unknown'
What unit is located in China and has Zhou Zhang as an author?
SELECT unit FROM table_name_53 WHERE location = "china" AND authors = "zhou zhang"
Who is the second for the team with alternate Margarita Fomina?
SELECT second FROM table_name_12 WHERE alternate = "margarita fomina"
who is Zach's friend?
SELECT friend FROM PersonFriend where name = 'Zach'
What is the percentage of cars that was produced by Japan among those that have a sweep volume of no less than 30?
SELECT CAST(SUM(CASE WHEN T3.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.displacement / T1.cylinders > 30
What is the status of the membership application on 2008-12-15?
SELECT status FROM table_name_26 WHERE membership_application = "2008-12-15"
What are the bike id of zip code 94041?
SELECT bike_id FROM trip WHERE zip_code = 94041
What is Expected End Date, when Trial Start Date is Nov 2007?
SELECT expected_end_date FROM table_name_65 WHERE trial_start_date = "nov 2007"
Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name.
SELECT t3.fname , 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" AND t3.major = "600"
How many players had been drafted in front of Yves archambault
SELECT pick__number FROM table_1473672_7 WHERE player = "Yves Archambault"
how many times was the incumbent is john b. yates?
SELECT COUNT(party) FROM table_2668347_14 WHERE incumbent = "John B. Yates"
Please list the texts of all the tweets in French posted by male users.
SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Lang = 'fr'
Show all flight number from Los Angeles.
SELECT flno FROM Flight WHERE origin = "Los Angeles"
Name the series on june 5
SELECT series FROM table_11965481_13 WHERE date = "June 5"
Can you please show me the current courses being taught with the last name of the instructor teaching them?
SELECT T2.emp_lname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code
Which major has least number of students? List the major and the number of students.
SELECT Major , count(*) FROM Student GROUP BY Major ORDER BY count(Major) ASC LIMIT 1;
What award did the character Homer simpson 20 achieve in 2009?
SELECT DISTINCT T1.award FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.year = 2009 AND T2.character = 'Homer Simpson';
How many apartments in this table?
SELECT count ( * ) from apartments
Please list the names of all the store contact employees whose credit cards expired in 2007.
SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T3.ExpYear = 2007 AND T1.PersonType = 'SC'
Find the name of customers who do not have a loan with a type of Mortgages.
SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'
How many songs are available in each format?
SELECT formats, count ( * ) FROM files group by formats