sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which Points is the lowest one that has a Score of 1–4, and a January smaller than 18? | SELECT MIN(points) FROM table_name_26 WHERE score = "1–4" AND january < 18 |
What is the enrollment for the colors green & black? | SELECT enrollment FROM table_261927_1 WHERE colors = "Green & Black" |
What were the points in the 1958-59 season? | SELECT points FROM table_2110959_1 WHERE season = "1958-59" |
When by80607002529af is the part number and september 2009 is the release date what is the l2 cache? | SELECT l2_cache FROM table_18823880_10 WHERE release_date = "September 2009" AND part_number_s_ = "BY80607002529AF" |
What's the type of the school whose students' name is spirits? | SELECT type FROM table_1973842_1 WHERE nickname = "Spirits" |
How many goals for occurred when the goals against was less than 56 and games played was larger than 7 with less than 6 wins? | SELECT COUNT(goals_for) FROM table_name_37 WHERE goals_against < 56 AND games_played > 7 AND wins < 6 |
What is the Airport when the ICAO shows rpvm? | SELECT airport FROM table_name_56 WHERE icao = "rpvm" |
Why did the change happened in Massachusetts (2)? | SELECT reason_for_change FROM table_18563954_3 WHERE state__class_ = "Massachusetts (2)" |
What are the weights of all the perpetrators from South Korea? | SELECT T1.Weight FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = "South Korea" |
Find the name of the instructors who taught C Programming course before. | SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming' |
Which staff members who reported problems from the product "rem" but not "aut"? Give me their first and last names. | SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "rem" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "aut" |
who's the writer of Bloody Mary? | Did you mean Bloody Mary or Bloody Mary : Lady Liberty? | Bloody Mary | SELECT Writer FROM book WHERE Title = "Bloody Mary" |
What is the closing and opening time of businesses located at Glendale with highest star rating? | SELECT T2.opening_time, T2.closing_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' ORDER BY T1.stars DESC LIMIT 1 |
How many points did the team have that conceded 41 goals and finish in a place larger than 10? | SELECT COUNT(points) FROM table_name_25 WHERE goals_conceded = 41 AND place > 10 |
What is the Australian open in 2010? | SELECT australian_open FROM table_name_71 WHERE year = 2010 |
What is the largest vote result for the Huddersfield constituency? | SELECT MAX(result___votes) FROM table_25818630_1 WHERE constituency = "Huddersfield" |
How many delegates do each of these counties have? | SELECT T1.County_name,COUNT ( * ) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id |
What's the English title listed that has an Original title of The Crying Game? | SELECT english_title FROM table_name_95 WHERE original_title = "the crying game" |
what's the maximum position with winnings $50,000 | SELECT MAX(position) FROM table_10160447_1 WHERE winnings = "$50,000" |
Which room has the highest base price? | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1; |
What is the sum of losses that have points of 11 and more than 1 draw? | SELECT SUM(lost) FROM table_name_86 WHERE points = 11 AND drawn > 1 |
How many faculty members do we have for each rank and gender? | SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex |
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 |
Show names for all employees with a salary greater than average | SELECT name FROM Employee WHERE salary > ( SELECT avg ( salary ) FROM Employee ) |
What team was the opponent in the 2008–09 season, with a final score of 2–3 l? | SELECT opponent FROM table_name_43 WHERE season = "2008–09" AND final_score = "2–3 l" |
What model type has 97100 model designation? | SELECT model_type FROM table_20866024_2 WHERE model_designation = "97100" |
Find the name of dorms which have TV Lounge but no Study Room as amenity. | SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room' |
How many Mountains Classifications were in the race with Mike Northey as Youth Classification? | SELECT COUNT(mountains_classification) FROM table_23157997_13 WHERE youth_classification = "Mike Northey" |
Which Completions has Attempts of 1,271? | SELECT completions FROM table_name_89 WHERE attempts = "1,271" |
What was the away team score at Windy Hill? | SELECT away_team AS score FROM table_name_15 WHERE venue = "windy hill" |
Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000. | SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000 |
What is the away team's score when footscray is the away team? | SELECT away_team AS score FROM table_name_74 WHERE away_team = "footscray" |
What card type did customer number 14 use? | SELECT card_type_code FROM Customers_cards where customer_id = 14 |
What about their length? | SELECT catalog_entry_name,LENGTH FROM catalog_contents WHERE LENGTH < 5 |
Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top. | SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2 |
Tell me the lowest gold for rank of 6 and total less than 2 | SELECT MIN(gold) FROM table_name_16 WHERE rank = "6" AND total < 2 |
List the names of all distinct wines that are made of red color grape. | SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" |
Which division had the most games with more than 5 total field goals on 2020/2/22? Give the full name of the division? | SELECT T2.division, T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2020-02-22' AND T1.FTAG + T1.FTHG > 5 ORDER BY T1.FTAG + T1.FTHG DESC LIMIT 1 |
What shows for 2002 when 2010 shows 69? | SELECT 2002 FROM table_name_85 WHERE 2010 = "69" |
Which paper ID cited the most word? In which class label does it belongs to? | SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id GROUP BY T1.paper_id, T1.class_label ORDER BY COUNT(T2.word_cited_id) DESC LIMIT 1 |
what is the top-5 when the tournament is totals and the top-25 is more than 4? | SELECT AVG(top_5) FROM table_name_80 WHERE tournament = "totals" AND top_25 > 4 |
What is the country that has the most perpetrators? | SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1; |
What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T? | SELECT employee_id , first_name , last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' ) |
How many bathroom count those building 809 has? | The total number of bathrooms building 809 has is NULL. | How about building 808? | SELECT sum ( bathroom_count ) FROM Apartments WHERE building_id = 808 |
Who is listed as the Winners with a Year of 2005? | SELECT winners FROM table_name_79 WHERE year = "2005" |
What is the u form of the word with a neuter form of skip and a masculine a-ending of fisker? | SELECT masculine_u_stems FROM table_name_18 WHERE neuter_a_stems = "skip" AND masculine_a_stems = "fisker" |
What was the broadcast date of episodes that were watched by 23.2 million viewers? | SELECT original_air_date FROM table_27714985_1 WHERE us_viewers__millions_ = "23.2" |
Which company has the most buildings? | Do you want to the name of the company? | Yes and the company ID. | select name,id from companies where id = ( SELECT company_id from office_locations group by company_id order by count ( * ) desc limit 1 ) |
Name the regular season for final playoffs | SELECT regular_season FROM table_2361911_2 WHERE playoffs = "Final" |
which is the biggest number of episode in the season, when the director of the episode was Constantine Makris? | SELECT MAX(no_in_season) FROM table_23117208_3 WHERE directed_by = "Constantine Makris" |
Give me the names of the accounts where the savings balance is more than 20000 | SELECT T1.name 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>20000 |
Find the name of airline which runs the most number of routes. | SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1 |
How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season? | SELECT T3.height_in_cm FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T2.height = T3.height_id WHERE T1.SEASON = '2005-2006' AND T1.TEAM = 'Yale Univ.' AND T1.PIM = 28 |
WHAT ROUND WAS FORWARD ANDRE PETERSSON SELECTED? | SELECT MIN(round) FROM table_11803648_17 WHERE position = "Forward" |
What name is under the Socialist ticket when Thomas J. Kreuzer was on the Democratic ticket? | SELECT socialist_ticket FROM table_name_92 WHERE democratic_ticket = "thomas j. kreuzer" |
Who won the most manager award? | Do you mean the first name of the person who won the most manager award? | Yes, and tell me the last name and the id of that person as well. | SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count ( * ) DESC LIMIT 1 |
How many times on page number 44 does the word "votives" appear? | SELECT T2.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'votives' AND T2.pid = 44 |
Name the total number of scoring average for money list rank of 174 | SELECT COUNT(scoring_average) FROM table_13026799_3 WHERE money_list_rank = "174" |
What Division One team were champions at the same time the Division Two Hereford Lads Club Colts were champs? | SELECT division_one FROM table_name_61 WHERE division_two = "hereford lads club colts" |
Please list the businesses names whose length of user review is long with business id from 1 to 20. | SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Long' AND T3.category_id BETWEEN 1 AND 20 GROUP BY T4.category_name |
What is the total number of bikes that can be hold in Redwood City before 2014. | SELECT SUM(CASE WHEN city = 'Redwood City' AND SUBSTR(installation_date, -4) < '2014' THEN dock_count ELSE 0 END) NUM FROM station |
What is the highest number against on 12/04/1969? | SELECT MAX(against) FROM table_name_19 WHERE date = "12/04/1969" |
What is the city code of Student Shiela Jones? | SELECT city_code FROM student WHERE Lname = "Jones" AND Fname = "Shiela" |
What is the NTSC M for Pal M 525/60? | SELECT ntsc_m FROM table_name_23 WHERE pal_m = "525/60" |
For each city, what is the highest latitude for its stations? | SELECT city , max(lat) FROM station GROUP BY city |
What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher? | SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name |
how many have times of 6 | SELECT COUNT(fastest_lap) FROM table_13512105_3 WHERE rnd = 6 |
What is the vehicle details of vehicle id 1 and 2 ? | SELECT vehicle_details FROM Vehicles WHERE vehicle_id = "1" or vehicle_id = "2" |
What is the average number of points for players from the "AIB" club? | SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = "AIB" |
can you show me target user id | Would you like a list of all the target user id? | yes | SELECT target_u_id from trust |
What is the Date of the tournament with a Score of 6-1 6-3? | SELECT date FROM table_name_22 WHERE score = "6-1 6-3" |
What was the Rebuildjahr(e) for the T2AA class? | SELECT rebuildjahr_e_ FROM table_name_17 WHERE class = "t2aa" |
Which genre has the most games? Show its id. | SELECT genre_id FROM ( SELECT T.genre_id, COUNT(T.id) FROM game AS T GROUP BY T.genre_id ORDER BY COUNT(T.id) DESC LIMIT 1 ) |
List the type of the services in alphabetical order. | SELECT service_type_code FROM services ORDER BY service_type_code |
Return the code of the card type that is most common. | SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1 |
Describe what happened in the episode of award no.296. | SELECT T1.summary FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T2.award_id = 296 |
What is Player, when Country is United States, and when Score is 70-72-70=212? | SELECT player FROM table_name_1 WHERE country = "united states" AND score = 70 - 72 - 70 = 212 |
What is the total number of bronze medals for the team with more than 4 silver and less than 30 gold medals? | SELECT COUNT(bronze) FROM table_name_41 WHERE silver > 4 AND nation = "total" AND gold < 30 |
Which Population density (per km²) has a Change (%) larger than 4.9, and a Land area (km²) smaller than 15.59, and a Population (2011) larger than 790? | SELECT MAX(population_density__per_km²_) FROM table_name_90 WHERE change___percentage_ > 4.9 AND land_area__km²_ < 15.59 AND population__2011_ > 790 |
Which Loss has a Date of july 2? | SELECT loss FROM table_name_71 WHERE date = "july 2" |
What is the ISIN that has a coupon of 1.02 and a value issued of 447,000,000? | SELECT isin FROM table_21692771_1 WHERE coupon = "1.02" AND amount_issued_[€] = "447,000,000" |
What show is coming back on in July 2008 | SELECT programme FROM table_13549921_18 WHERE date_s__of_return = "July 2008" |
Which Capacity has a City of london, and a Stadium of queen's club? | SELECT AVG(capacity) FROM table_name_85 WHERE city = "london" AND stadium = "queen's club" |
Find the first names of the faculty members who are playing Canoeing or Kayaking. | SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' |
What is the Label of the release on Stereo vinyl LP with Catalog number SF-7635? | SELECT label FROM table_name_75 WHERE format = "stereo vinyl lp" AND catalog = "sf-7635" |
What are the building full names that contain the word "court"? | SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%" |
how many votes did she get? | Do you mean the total votes in four election or list them separately? | the total votes | SELECT sum ( T2.President_VOTE ) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = "F" |
What are the first name and last name of the professionals who have done treatment with cost below average? | SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments) |
How many match values have points under 14 and 0 draws? | SELECT COUNT(match) FROM table_name_23 WHERE points < 14 AND draw < 0 |
How many Summer games are there that were held in Paris? | SELECT COUNT(T3.id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Paris' AND T3.season = 'Summer' |
What is Player, when Place is 2? | SELECT player FROM table_name_93 WHERE place = "2" |
What are the details of the shops that can be accessed by walk? | SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" |
What year did the Nerang Suburb get founded? | SELECT COUNT(founded) FROM table_name_96 WHERE suburb = "nerang" |
Which Leader has Spoilt Votes as % of Seats? | SELECT leader FROM table_name_26 WHERE _percentage_of_seats = "spoilt votes" |
Which Country has a To par larger than 3, and a Year(s) won of 1979? Question 1 | SELECT country FROM table_name_3 WHERE to_par > 3 AND year_s__won = "1979" |
What number episode in the series is the episode "things that fly"? | SELECT MAX(series_number) FROM table_13505192_3 WHERE episode_title = "Things That Fly" |
How many services has each resident requested? List the resident id, details, and the count in descending order of the count. | SELECT t1.resident_id , t1.other_details , count(*) FROM residents AS t1 JOIN residents_services AS t2 ON t1.resident_id = t2.resident_id GROUP BY t1.resident_id ORDER BY count(*) DESC |
When was the first asset acquired? | SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC LIMIT 1 |
Find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts. | SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3 |
what is the declination (j2000) when the ngc number is higher than 3593? | SELECT declination___j2000__ FROM table_name_90 WHERE ngc_number > 3593 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.