sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
find the date moved in for the resident id 6 | SELECT date_moved_in from residents where resident_id = 6 |
How many attendances have w 48-10 as the result? | SELECT SUM(attendance) FROM table_name_6 WHERE result = "w 48-10" |
Please show the most common status of roller coasters. | SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 |
What are all of the products whose name includes the substring "Scanner"? | SELECT product FROM product WHERE product LIKE "%Scanner%" |
What is the ratio of the highest and lowest temperature in store 11? | SELECT CAST((MAX(T1.tmax) - MIN(T1.tmin)) AS REAL) / MIN(T1.tmin) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 11 |
Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000. | SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000 |
can you show me a list of cinema names? | SELECT Name FROM cinema |
which one is the opened first? | SELECT Name FROM cinema ORDER BY Openning_year ASC LIMIT 1 |
what is the drawn when the won is 12? | SELECT drawn FROM table_12828723_4 WHERE won = "12" |
How many poles in the year 2000 | SELECT MAX(poles) FROM table_1875157_1 WHERE year = 2000 |
How many cardiff wins have a draw greater than 27? | SELECT COUNT(cardiff_win) FROM table_name_26 WHERE draw > 27 |
What was the score of the game against Minnesota? | SELECT score FROM table_name_55 WHERE opponent = "minnesota" |
Who ran in the race for Jack Brooks' seat? | SELECT candidates FROM table_1341865_45 WHERE incumbent = "Jack Brooks" |
When the Total is less than 1, how many Bronze medals are won? | SELECT MIN(bronze) FROM table_name_27 WHERE total < 1 |
Among the students with disabilities, list any five students' names who are unemployed. | SELECT T1.name FROM disabled AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name LIMIT 5 |
What is the capacity of code f4r? | SELECT capacity FROM table_name_81 WHERE code = "f4r" |
What is the horsepower and model year of the car named Subaru Dl? | SELECT T1.horsepower, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'subaru dl' |
What are the dates of those, please? | SELECT project_id,Document_Date FROM Documents GROUP BY project_id HAVING count ( * ) > = 3 |
And how many are female? | Do you mean the people who are female? | Yes, how many are female, have gender "F" | SELECT count ( * ) from people where sex = 'F' |
What are all the labels? | SELECT DISTINCT label FROM Albums |
Which team had 342 total points? | SELECT team FROM table_24784769_1 WHERE total_points = 342 |
What country has a to par less than 13, with wayne grady as the player? | SELECT country FROM table_name_6 WHERE to_par < 13 AND player = "wayne grady" |
Find all the stage positions of the musicians with first name "Solveig" | SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = "Solveig" |
Among the female legislators, what is the percentage of the senators in Maine? | SELECT CAST(SUM(CASE WHEN T2.type = 'sen' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.type) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' AND T1.gender_bio = 'F' |
Return the name of the airport with code 'AKO'. | SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO" |
What is the average price of products that cost between 100 and 200? | SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200 |
Find the name of route that has the lowest number of deliveries? | SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count ( * ) DESC LIMIT 1 |
What is the depth at the UTC time of 12:19:36? | SELECT depth FROM table_26950408_1 WHERE time___utc__ = "12:19:36" |
How many countries are the Tata Sabaya Lava domes located in? | SELECT COUNT(country) FROM table_1081235_1 WHERE name_of_lava_dome = "Tata Sabaya lava domes" |
Which dish has the highest price on the menu "Zentral Theater Terrace"? Please give its name. | SELECT T4.name FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Zentral Theater Terrace' ORDER BY T1.price DESC LIMIT 1 |
What was the Runner-up with Ohio as the National Champion in Tucson, AZ? | SELECT runner_up FROM table_name_53 WHERE national_champion = "ohio" AND location = "tucson, az" |
How many numbers were recorded under miles for the 3:00:46 race time? | SELECT COUNT(miles__km_) FROM table_2196127_1 WHERE race_time = "3:00:46" |
Find the name of project that continues for the longest time. | SELECT name FROM projects ORDER BY hours DESC LIMIT 1 |
can you show me an average of revenue? | SELECT avg ( Revenue ) FROM manufacturers |
Please state any three business numbers in AZ state that have received the "Great experience" review stars. | SELECT DISTINCT T2.business_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.state LIKE 'AZ' AND T1.review_stars = 5 LIMIT 3 |
Find the first names of the teachers that teach first grade. | SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 |
What is the points number when 20 shows for played, and lost is 0? | SELECT points_for FROM table_name_19 WHERE played = "20" AND lost = "0" |
Which 1956 has a County of vâlcea, and a 2011 smaller than 371714? | SELECT SUM(1956) FROM table_name_40 WHERE county = "vâlcea" AND 2011 < 371714 |
Which cities have exactly 2 parks? | SELECT city FROM park GROUP BY city HAVING count ( * ) = 2 |
Name the object type with an NGC number more than 6638 and right ascensions being 18h25m37.8s | SELECT object_type FROM table_name_72 WHERE ngc_number > 6638 AND right_ascension___j2000__ = "18h25m37.8s" |
Name the year for willie goggin | SELECT year FROM table_225880_1 WHERE runner_s__up = "Willie Goggin" |
List all the characteristic names and data types of product "cumin". | SELECT t3.characteristic_name, 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" |
Who was the Opponent when Terry Miles was the Man of the Match? | SELECT opponent FROM table_name_1 WHERE man_of_the_match = "terry miles" |
what is the highest rank with a total less than 1? | SELECT MAX(rank) FROM table_name_68 WHERE total < 1 |
What are the names of the different artists from Bangladesh who never received a rating higher than a 7? | SELECT DISTINCT artist_name FROM artist WHERE country = "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 |
What number has the builder ruston hornsby, the date 1961, and the name Topsy? | SELECT COUNT(number) FROM table_name_10 WHERE builder = "ruston hornsby" AND date = 1961 AND name = "topsy" |
How many products shipped on 19/11/1994 were ordered on 21/09/1994? | SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-09-21' AND T2.l_shipdate = '1994-11-19' |
How many Wikipedia pages with over 4000 different words are there on the Catalan language? | SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 4000 |
Name for me the total number in attendance for week before 2 and result of t 24-24 | SELECT COUNT(attendance) FROM table_name_60 WHERE result = "t 24-24" AND week < 2 |
If the specimen weight/size is 1000 g / 8.79 cm, what is the calculated activity? | SELECT COUNT(calculated_activity___bq__) FROM table_26211058_1 WHERE specimen_weight_size = "1000 g / 8.79 cm" |
Name the most expensive and the least expensive products available, excluding free gifts. | SELECT Name FROM Products WHERE Price IN (( SELECT MAX(Price) FROM Products ), ( SELECT MIN(Price) FROM Products )) |
Name all the volcano mountains between the height of 2000 to 4000. | SELECT Name FROM mountain WHERE Type = 'volcano' AND Height BETWEEN 2000 AND 4000 |
What is the episode title for the episode numbered #1.4? | SELECT episode_title FROM table_15211468_1 WHERE episode_no = "#1.4" |
Which Launched has Commissioned 6 june 1935? | SELECT launched FROM table_name_36 WHERE commissioned = "6 june 1935" |
What is the percentage of the teams who had post season (playoff) were ranked number 1? | SELECT CAST(SUM(CASE WHEN rank = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(name) FROM teams |
How many professors teach a class with the code ACCT-211? | SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = "ACCT-211" |
I want to know the longest Long for santana moss and Att more than 1 | SELECT MIN(long) FROM table_name_5 WHERE player = "santana moss" AND att > 1 |
Find the name of the customers who use the most frequently used payment method. | SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1) |
What's the Total number of Opening Weekend Net Gross that occured after the year 2012 with a Rank of 1? | SELECT COUNT(opening_weekend_net_gross) FROM table_name_82 WHERE year > 2012 AND rank = 1 |
Name the junes | SELECT june FROM table_1539201_1 |
What was eliminated on the air date of November 3, 2005? | SELECT eliminated FROM table_1893276_2 WHERE air_date = "November 3, 2005" |
What is the average miles per gallon of all the cards with 4 cylinders? | SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4; |
What are the birthdays of people in ascending order of height? | SELECT Birth_Date FROM People ORDER BY Height ASC |
What is the longest time for a student from the navy department to be absent from school? | SELECT T1.month FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'navy' ORDER BY T1.`month` DESC LIMIT 1 |
Show the starting years shared by technicians from team "CLE" and "CWS". | SELECT Starting_Year FROM technician WHERE Team = "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team = "CWS" |
What is the Nationality of the player named Yahaya, who has as App(L/C/E) of 0 (0/0/0)? | SELECT nat FROM table_name_76 WHERE app_l_c_e_ = "0 (0/0/0)" AND name = "yahaya" |
What is the power at the cebu station? | SELECT power__kw_ FROM table_19215259_1 WHERE location = "Cebu" |
Among the customers from the United States, which market segment has the highest number of customers? | SELECT T.c_mktsegment FROM ( SELECT T1.c_mktsegment, COUNT(T1.c_custkey) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'UNITED STATES' GROUP BY T1.c_mktsegment ) AS T ORDER BY T.num DESC LIMIT 1 |
What number in season is number 141 in series? | SELECT MAX(no_in_season) FROM table_27491610_2 WHERE no_in_series = 141 |
who is the incumbent with candidates being bud shuster (r) unopposed | SELECT incumbent FROM table_1341586_39 WHERE candidates = "Bud Shuster (R) Unopposed" |
Provide address of ID 1? | SELECT address FROM customers WHERE id = 1 |
What is the ID of audiences that gave the most rating of 5? | SELECT userid FROM u2base WHERE rating = 5 GROUP BY userid ORDER BY COUNT(movieid) DESC LIMIT 1 |
What is the race class with most number of races. | SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1 |
Who was the Away team at Arden Street Oval? | SELECT away_team FROM table_name_98 WHERE venue = "arden street oval" |
Find the name of rooms whose base price is between 120 and 150. | SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 |
Who did the Jets play in their pre-week 9 game at the Robert F. Kennedy memorial stadium? | SELECT opponent FROM table_name_32 WHERE week < 9 AND game_site = "robert f. kennedy memorial stadium" |
What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department? | SELECT DISTINCT T2.emp_fname , T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems' |
How many characters where actor/actress is larry lamb? | SELECT COUNT(character) FROM table_25831483_1 WHERE actor_actress = "Larry Lamb" |
What is the budget in billions of the Treasury Department? | SELECT Budget_in_Billions FROM department where name = "Treasury" |
Which Week 7 Oct 12 has a Week 11 Nov 9 of week 11 nov 9? | SELECT week_7_oct_12 FROM table_name_15 WHERE week_11_nov_9 = "week 11 nov 9" |
what is the venue when the event is 4x400 m relay and the competition is asian championships? | SELECT venue FROM table_name_7 WHERE event = "4x400 m relay" AND competition = "asian championships" |
List all the titles and year to date sales by author who are not on contract. | SELECT T1.title_id, T1.ytd_sales FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T3.contract = 0 |
How many cars have more than 4 cylinders? | SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4; |
What are all the distinct premise types? | SELECT DISTINCT premises_type FROM premises |
Please list the blocks where all the incidents in the district commanded by Robert A. Rubio took place. | SELECT T2.block FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio' |
Find the average height and weight for all males (sex is M). | SELECT avg ( height ) , avg ( weight ) FROM people WHERE sex = 'M' |
How many women speak German? | SELECT females FROM table_name_67 WHERE language = "german" |
How many times was the player drawn that had less than 12 losses and a goal difference of +20? | SELECT drawn FROM table_name_44 WHERE lost < 12 AND goal_difference = "+20" |
If the Ovrs is less than 2, what's the average in Wkts? | SELECT AVG(wkts) FROM table_name_95 WHERE ovrs < 2 |
Which party had a term start of 5 august 1999? | SELECT party FROM table_name_95 WHERE term_start = "5 august 1999" |
Find the name of the nurse who has the largest number of appointments. | SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1 |
How many totals have andy north as the player? | SELECT SUM(total) FROM table_name_96 WHERE player = "andy north" |
What is the sum of Goals, when Season is "2005-06", and when Division is less than 1? | SELECT SUM(goals) FROM table_name_43 WHERE season = "2005-06" AND division < 1 |
Who are all of the players on the Westchester High School club team? | SELECT player FROM table_10015132_9 WHERE school_club_team = "Westchester High School" |
What is Jockey, when Post is 12? | SELECT jockey FROM table_name_53 WHERE post = 12 |
How many TotalEnrollment of Campus California State University-Channel Islands? | SELECT t2.TotalEnrollment_AY FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus where t1.campus = "California State University-Channel Islands" |
What is the col (m) of the Barurumea Ridge peak? | SELECT MAX(col__m_) FROM table_18946749_2 WHERE peak = "Barurumea Ridge" |
which year has the highest number of degrees? | SELECT Year from degrees order by Degrees DESC LIMIT 1 |
Name the 2010 for 2011 of a and 2008 of 1r | SELECT 2010 FROM table_name_61 WHERE 2011 = "a" AND 2008 = "1r" |
What is the 2012 value when the 2011 and 2007 values are 1R? | SELECT 2012 FROM table_name_28 WHERE 2011 = "1r" AND 2007 = "1r" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.