sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which category does the app id No.894384172610331000 belong to? | SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = '894384172610331000' |
Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in? | SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name 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 is the state rank of the company with 6.8 billion in revenue? | SELECT state_rank_by_revenue FROM table_21926985_2 WHERE revenue__$billions__2012_estimate = "6.8" |
How many followers does each user have? | SELECT COUNT(*) FROM follows |
List all movie id associated with Brittany Harris and their rating date. | SELECT T1.mID, T1.ratingDate FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = "Brittany Harris" |
Give the maximum price and score for wines produced in the appelation St. Helena. | SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = "St. Helena" |
What is the full name of the team that the 'NBA Coach of the Year' 1992 winner coached? | SELECT name FROM teams AS T1 INNER JOIN coaches AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN awards_coaches AS T3 ON T2.coachID = T3.coachID AND T2.year = T3.year WHERE T3.year = 1992 AND award = 'NBA Coach of the Year' |
What ends has transferred as the type? | SELECT ends FROM table_name_92 WHERE type = "transferred" |
Which team hosted the Kansas City Chiefs? | SELECT host_team FROM table_name_53 WHERE visiting_team = "kansas city chiefs" |
What is the Class AAAAA when the Class AAA is Gonzales? | SELECT class_aAAA FROM table_name_28 WHERE class_aAA = gonzales |
What was the TO par for the player who scored 68-71=139? | SELECT to_par FROM table_name_73 WHERE score = 68 - 71 = 139 |
How many rooms does each block floor have? | SELECT count(*) , T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor |
What is the host year of city "Taizhou ( Zhejiang )"? | SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = "Taizhou ( Zhejiang )" |
Who wrote episode #1 in season 7? | SELECT COUNT(writer) FROM table_10470082_8 WHERE _number = 1 |
What is the Court Rank of Son of Norihiro's Lineage? | SELECT court_rank FROM table_name_6 WHERE lineage = "son of norihiro" |
What is the date and id of the transcript with at least 2 courses listed? | SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2 |
What is the title name for the highest recorded single track ? | select name from track order by milliseconds desc limit 1 |
What is the average number of actors acted in comedy movies? | SELECT AVG(T1.actor_id) FROM film_actor AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id INNER JOIN actor AS T4 ON T4.actor_id = T1.actor_id WHERE T3.name = 'comedy' |
State the customer details of customer id 263? | SELECT customer_details from customers where customer_id = 263 |
What is every number for the hometown of Canton, Illinois? | SELECT no FROM table_22824297_1 WHERE hometown = "Canton, Illinois" |
Where was d: ~100nm, l: 1 μm geometry researched? | SELECT researched_at FROM table_30057479_1 WHERE geometry = "D: ~100nm, L: 1 μm" |
What is Pro Year(s), when Team is Cincinnati Royals? | SELECT pro_year_s_ FROM table_name_79 WHERE team = "cincinnati royals" |
What are the names of those stations? | SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg ( bikes_available ) > 10 EXCEPT SELECT name FROM station WHERE city = "San Jose" |
What is the highest ERP W with a w216bo call sign? | SELECT MAX(erp_w) FROM table_name_10 WHERE call_sign = "w216bo" |
What are the names of the sections in reverse alphabetical order? | SELECT section_name FROM Sections ORDER BY section_name DESC |
What is the average number of against with less than 10 losses, more than 0 draws, and more than 7 wins? | SELECT AVG(against) FROM table_name_74 WHERE losses < 10 AND draws > 0 AND wins > 7 |
How many polling areas are there with John Taber as the sitting Representative? | SELECT COUNT(district) FROM table_1342256_32 WHERE incumbent = "John Taber" |
please list the years of film market estimations when the market is in country "Japan" in descending order. | SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = "Japan" ORDER BY T1.Year DESC |
ExxonMobil is located in Punto Chapultepec, correct? | SELECT * FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id where T3.name = "ExxonMobil" and T2.name = "Punto Chapultepec" |
How many models does the VIVO phone brand released? | SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE phone_brand = 'vivo' |
What dorm id have the amenity id 922? | SELECT T2.dormid FROM has_amenity AS T2 where T2.amenid = 922 |
What's the London borough with 7797 Pakistani citizens? | SELECT london_borough FROM table_19149550_9 WHERE pakistani_population = 7797 |
What was the percentage of Slovenes in 1951 in the village that had 10.1% in 1991? | SELECT percent_of_slovenes_1951 FROM table_name_22 WHERE percent_of_slovenes_1991 = "10.1%" |
In which cities beginning with the letter M have the Olympic Games been held? | SELECT city_name FROM city WHERE city_name LIKE 'M%' |
Show all countries and the number of people from each country. | SELECT country , count(*) FROM people GROUP BY country |
Find the number of students for the cities where have more than one student. | SELECT count(*) , city_code FROM student GROUP BY city_code HAVING count(*) > 1 |
Which Manufacturer has a Grid smaller than 9, and a Time of +22.517? | SELECT manufacturer FROM table_name_47 WHERE grid < 9 AND time = "+22.517" |
What is Left Office, when Party is Vacant (1999-2001)? | SELECT left_office FROM table_name_83 WHERE party = "vacant (1999-2001)" |
Tell me the name with decile of 6 and roll of 93 | SELECT name FROM table_name_63 WHERE decile = "6" AND roll = 93 |
From which institute is harder to graduate for a bachelor, Amridge University or Auburn University? | SELECT chronname FROM institution_details WHERE chronname IN ('Amridge University', 'Auburn University') ORDER BY grad_100_value LIMIT 1 |
How many distinct countries are the climbers from? | SELECT COUNT(DISTINCT Country) FROM climber |
Find the number and time of the train that goes from Chennai to Guruvayur. | SELECT train_number , TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur' |
What are the races that johnny rutherford has won? | SELECT name FROM table_10706879_3 WHERE winning_driver = "Johnny Rutherford" |
What is the total salary paid by team Boston Red Stockings in 2010? | SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 |
Tell me the name of the instructor who getting high salary...And tell his department name too... | How do you define a high salary? | Higher than 80000..... | SELECT name FROM instructor WHERE salary > 80000 |
How many students live in each city? | SELECT city_code , count(*) FROM Student GROUP BY city_code |
If 1967 is the winning year and a player has a total recorded as wd with a To par under 16, what's the players name? | SELECT player FROM table_name_43 WHERE total = "wd" AND to_par < 16 AND year_s__won = "1967" |
What was the 15th club in 2012? | SELECT club FROM table_name_46 WHERE year = 2012 AND order = "15th" |
find all dependent names who have a spouse relation with some employee. | SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse' |
Which Nation has a Second of tomas pitonak? | SELECT nation FROM table_name_72 WHERE second = "tomas pitonak" |
How many footnotes have been made in year 1980 and what are the table names of these countries that made the footnotes? | SELECT COUNT(T2.Description) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Year = 'YR1980' UNION ALL SELECT DISTINCT T1.TableName FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Year = 'YR1980' |
What is the year of the Lotus 18 chassis? | SELECT COUNT(year) FROM table_name_97 WHERE chassis = "lotus 18" |
How many draws when there are fewer than 6 wins and the goal difference is less than -15? | SELECT COUNT(draws) FROM table_name_28 WHERE wins < 6 AND goal_difference < -15 |
Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts. | SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC |
What Valley Vista has a Dysart of 1668? | SELECT valley_vista FROM table_name_39 WHERE dysart = "1668" |
How many times did the team Werder Bremen win as the away team in matches of the Bundesliga division? | SELECT COUNT(T1.Div) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Bundesliga' AND T1.AwayTeam = 'Werder Bremen' AND T1.FTR = 'A' |
What is the maximum points against when team's points are 10? | SELECT MAX(points) AS against FROM table_16770037_3 WHERE pts = 10 |
Among the users who are above 20, how many users use device model of ELIFE E7 Mini? | SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'ELIFE E7 Mini' AND T1.age > 20 |
What is the average Gold, when Nation is Hungary, and when Bronze is greater than 1? | SELECT AVG(gold) FROM table_name_2 WHERE nation = "hungary" AND bronze > 1 |
Who attended the school in 2009, that Lakita Hall attended in 2007? | SELECT 2009 FROM table_name_60 WHERE 2007 = "lakita hall" |
What are the most common types of interactions between enzymes and medicine, and how many types are there? | SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1 |
List all results from the 3-3 scoring game. | SELECT result FROM table_24561550_1 WHERE record = "3-3" |
Who is the friend of Zach with longest year relationship? | SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach') |
Who was Class AA in School Year 1994-95? | SELECT class_aA FROM table_name_26 WHERE school_year = "1994-95" |
List the number of invoices from the US, grouped by state. | SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state; |
which ships were lost? | SELECT * FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Fate Like "%Lost%" |
Indicate the page id of Wikipedia about Catalan language of all the pages that have a numeric value in their title. | SELECT pid, title FROM pages WHERE title LIKE '%0%' OR '%1%' OR '%2%' OR '%3%' OR '%4%' OR '%5%' OR '%6%' OR '%7%' OR '%8%' OR '%9%' |
Among the customers who have rented the film ACADEMY DINOSAUR, how many of them are active? | SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.active = 1 AND T4.title = 'ACADEMY DINOSAUR' |
List the first names of all the students in room 107. | SELECT DISTINCT firstname FROM list WHERE classroom = 107 |
What are all the policy types of the customer that has the most policies listed? | SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1) |
What is the judge's total for Roxanne and Daniel? | SELECT judges FROM table_19744915_16 WHERE couple = "Roxanne and Daniel" |
How many persons in total have participated in 12 meter Mixed Sailing competitions? | SELECT COUNT(T1.competitor_id) FROM competitor_event AS T1 INNER JOIN event AS T2 ON T1.event_id = T2.id INNER JOIN sport AS T3 ON T2.sport_id = T3.id WHERE T2.event_name = 'Sailing Mixed 12 metres' |
Who is the winner for the Tournament in Hong Kong with a third place winner named Mikael Pernfors? | SELECT winner FROM table_name_32 WHERE third_place = "mikael pernfors" AND tournament = "hong kong" |
What player from the United States played for the Grizzlies from 1997-1998? | SELECT player FROM table_name_83 WHERE nationality = "united states" AND years_for_grizzlies = "1997-1998" |
find the number of different programs that are broadcast during night time. | SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' |
Which Nationality has a Previous team of new york knicks, and more than 3 Years of NBA experience? | SELECT nationality FROM table_name_30 WHERE previous_team = "new york knicks" AND years_of_nba_experience_[a_] > 3 |
what is the highest rank for east germany with points of 128.98 and places less than 70? | SELECT MAX(rank) FROM table_name_40 WHERE nation = "east germany" AND points = 128.98 AND places < 70 |
What was the score on April 18? | SELECT score FROM table_name_49 WHERE date = "april 18" |
What percentage of journals whose short name begins with ANN were published in the paper database in 1989? | SELECT CAST((SUM(CASE WHEN T1.ShortName LIKE 'ANN%' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.ShortName) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 1989 |
Which players are from Indonesia? | SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" |
Name the league for strikeouts being 451 | SELECT league FROM table_242813_2 WHERE strikeouts = 451 |
What is the course code for the class named Statistics? | Do you mean the course code for the course whose description is Statistics? | yes. | SELECT CRS_CODE from course where CRS_DESCRIPTION = 'Statistics' |
Which Date has a Record of 1-4? | SELECT date FROM table_name_34 WHERE record = "1-4" |
What is the points classification when the Intergiro classification is Sven Krauß, and the mountains classification is koldo gil, Trofeo Super Team is Liquigas-Bianchi, and stage is 9? | SELECT points_classification FROM table_name_19 WHERE intergiro_classification = "sven krauß" AND mountains_classification = "koldo gil" AND trofeo_super_team = "liquigas-bianchi" AND stage = "9" |
What programs are there for the South Fork Dirt Riders track? | SELECT program FROM table_name_44 WHERE track_name = "south fork dirt riders" |
When was the incumbent first elected in the district where the result was a democratic-republican gain? | SELECT first_elected FROM table_2668401_17 WHERE result = "Democratic-Republican gain" |
Show the order ids and the number of items in each order. | SELECT order_id , count(*) FROM Order_items GROUP BY order_id |
Which first match had a final position/round in the third qualifying round? | SELECT first_match FROM table_name_72 WHERE final_position___round = "third qualifying round" |
Who was the lyricist for composer Haewon Park? | SELECT lyricist_s_ FROM table_name_36 WHERE composer_s_ = "haewon park" |
What is the Record of the game with a Score of 107–108? | SELECT record FROM table_name_85 WHERE score = "107–108" |
How many submissions are there? | SELECT count(*) FROM submission |
What date was the loss of ponson (4–3)? | SELECT date FROM table_name_68 WHERE loss = "ponson (4–3)" |
What is Pos., when Height is "m (ft 10in)", and when Date of Birth is "1983-05-29"? | SELECT pos FROM table_name_45 WHERE height = "m (ft 10in)" AND date_of_birth = "1983-05-29" |
Who is the owner of the Raglan Road winner? | SELECT owner FROM table_name_43 WHERE winner = "raglan road" |
What are the customer name and date of the orders whose status is "Delivered". | SELECT t1.customer_name , t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" |
I want the circuit for jim clark | SELECT circuit FROM table_name_25 WHERE fastest_lap = "jim clark" |
Who did Teo Fabi drive for when he won and had pole position? | SELECT winning_team FROM table_name_74 WHERE winning_driver = "teo fabi" AND pole_position = "teo fabi" |
Can you tell me the Place that has the Country of australia, and the Player of ian baker-finch? | SELECT place FROM table_name_22 WHERE country = "australia" AND player = "ian baker-finch" |
How many days did the sun rise before 5 AM? | SELECT COUNT(DISTINCT `date`) AS days FROM weather WHERE sunrise < time('05:00:00') |
Name the least average with wickets more than 265 and career of 1888/89-1913/14 and matches more than 51 | SELECT MIN(average) FROM table_name_38 WHERE wickets > 265 AND career = "1888/89-1913/14" AND matches > 51 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.