sentence
stringlengths
3
347
sql
stringlengths
18
804
Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.
SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3
What golfer has a greater than 293 total, and won in 1989?
SELECT player FROM table_name_34 WHERE total > 293 AND year_s__won = "1989"
What is the campus fee of "San Jose State University" in year 1996?
SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Jose State University" AND T2.year = 1996
How many male users use the Galaxy Ace Plus model?
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 = 'Galaxy Ace Plus' AND T1.gender = 'M'
What are all the makers and models?
SELECT Maker, Model FROM MODEL_LIST
Name the FCC info for call sign of k208eq
SELECT fcc_info FROM table_name_51 WHERE call_sign = "k208eq"
How many solar eclipse on June 10-11, while November 3 is 153?
SELECT june_10_11 FROM table_25287007_2 WHERE november_3 = "153"
when was the ship laid down when it was completed on 3 july 1926?
SELECT laid_down FROM table_name_43 WHERE completed = "3 july 1926"
Show the description of the transaction type that occurs most frequently.
SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
What are the notes regarding the scout x-4 vehicle which ceased operation in June 1971?
SELECT notes FROM table_name_82 WHERE vehicle = "scout x-4" AND ceased_operation = "june 1971"
Return the decor of the room named "Recluse and defiance".
SELECT decor FROM Rooms WHERE roomName = "Recluse and defiance";
Where is the club "Pen and Paper Gaming" located?
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
Who won the Best Female Artist where Best R&B Contributor won the Best Male Lyricist?
SELECT best_female_artist FROM table_22546460_4 WHERE best_male_lyricist = "Best R&B Contributor"
How many o-19% are where the quartier is in saint-loup?
SELECT _percentage_0_19_years FROM table_29615165_5 WHERE quartier = "Saint-Loup"
Have the teacher "42d43fa6f37314365d08692e08680973" acquired P.h.D or doctor degree?
SELECT CASE WHEN teacher_prefix = 'Dr.' THEN 'Yes' ELSE 'NO' END FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973'
How many "food maintenance" related violations did inspection no.1454071 have?
SELECT COUNT(T2.point_id) FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.inspection_id = '1454071' AND T1.category = 'Food Maintenance'
Which team had the least number of attendances in home games in 1980?
SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;
How many crimes described as 'The theft of a motor vehicle' by the FBI have taken place in the Lake View community?
SELECT SUM(CASE WHEN T3.community_area_name = 'Lake View' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no WHERE T1.description = 'The theft of a motor vehicle.'
What year(s) were they nominated in?
SELECT year FROM musical GROUP BY Nominee HAVING COUNT ( * ) > 1
On average how large is the population of the counties?
SELECT avg(Population) FROM county
How many professors are there?
SELECT count ( * ) FROM Faculty WHERE Rank = "Professor"
What line has Newmarket Junction terminus?
SELECT line_name FROM table_name_4 WHERE terminus = "newmarket junction"
How many bedrooms are there in those buildings?
SELECT sum ( T2.bedroom_count ) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym"
What dates was champion masahiro kawamura at the ibaraki country club tournament?
SELECT dates FROM table_name_6 WHERE tournament_location = "ibaraki country club" AND champion = "masahiro kawamura"
What is the highest place of the song with 38 votes and a draw great than 3?
SELECT MAX(place) FROM table_name_8 WHERE votes = 38 AND draw > 3
How many Drawn is which has a Games smaller than 6?
SELECT SUM(drawn) FROM table_name_61 WHERE games < 6
What is the running of marlene sanchez?
SELECT running FROM table_12407546_2 WHERE athlete = "Marlene Sanchez"
Among the players who died in Massachussets, how many of them have won an award?
SELECT COUNT(DISTINCT T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.deathState = 'MA'
What is the average ROM size of a phone made by company Nokia?
SELECT avg ( T1.ROM_MiB ) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation"
Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?
SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
How many occurrences does the word "panajot" have?
SELECT occurrences FROM words WHERE word = 'panajot'
What was the average crowd size when the away team was South Melbourne?
SELECT AVG(crowd) FROM table_name_63 WHERE away_team = "south melbourne"
What is the current club with more than 368 apps and a debut year earlier than 1994?
SELECT current_club FROM table_name_51 WHERE apps > 368 AND debut_year < 1994
What year did Miyoshi Umeki make a film?
SELECT year FROM table_name_25 WHERE name = "miyoshi umeki"
what language is seethaiah in
SELECT language FROM table_name_27 WHERE film_name = "seethaiah"
Thank you very much! Can you filter that list to show only the artist_names who have song for which the country code is the UK?
SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name
What was Gassaway's record at the fight in mississippi, united states against anthony macias?
SELECT record FROM table_name_19 WHERE location = "mississippi, united states" AND opponent = "anthony macias"
How about those with no loans?
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING count ( * ) = 0
How many hours of role-playing games were played?
SELECT sum ( hours_played ) FROM Plays_games AS T1 JOIN Video_games where GType = "Role-playing game"
What was the location of the game with a score of 2:3?
SELECT location FROM table_name_90 WHERE score = "2:3"
How many professionals did not operate any treatment on dogs?
SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )
What is the Tonnage of the ship from Canada?
SELECT MAX(tonnage) FROM table_name_73 WHERE flag = "canada"
How many non-active clients have not returned the rented material?
SELECT COUNT(T2.customer_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.active = 0
Hmm, can you list the invoice numbers which are created before 1989-09-03 or after 2007-12-25?
SELECT invoice_number FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
On 8/29/2013 at 6:14:01 PM, how many bikes were borrowed from San Jose Diridon Caltrain Station?
SELECT SUM(T1.dock_count - T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T1.id = T2.station_id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.time = '2013/08/29 06:14:01'
What about staff members who reported problems for the product "rem"?
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"
Show the number of documents.
SELECT count(*) FROM Documents
What is draft detail of the document with id 7?
SELECT draft_details FROM Document_Drafts WHERE document_id = 7
Which model with a fleet series of s410-s434?
SELECT model FROM table_name_60 WHERE fleet_series = "s410-s434"
What is the average rating of the reviewers?
SELECT avg ( stars ) FROM Rating
Which region is the majority of the athletes from?
SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1
What is his id?
SELECT T1.Railway_ID FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID order by count ( * ) desc limit 1
What is the region id of Christine Jacoba Aaftink?
SELECT T1.region_id FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T2.full_name = 'Christine Jacoba Aaftink'
What are the top 3 stations that have sold the highest quantities for an item in a single day?
SELECT T2.station_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr ORDER BY T1.units DESC LIMIT 3
What year is the Grim Fandango with a windows platform?
SELECT year FROM table_name_36 WHERE platform_s_ = "windows" AND game = "grim fandango"
Which organisation type hires most research staff?
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1;
Which country is 9 Green Ridge Point, Arendal located at?
SELECT T2.country_name FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T1.street_number = 9 AND T1.street_name = 'Green Ridge Point' AND T1.city = 'Arendal'
Who is the turner on Team MRF?
SELECT tuner FROM table_name_23 WHERE team = "mrf"
What are the account details with the largest value?
SELECT Account_details FROM Accounts order by Account_details desc limit 1
Which network has a play-by-play announcer of John Wells?
SELECT network FROM table_name_36 WHERE play_by_play = "john wells"
How many different software platforms are there for devices?
SELECT count(DISTINCT Software_Platform) FROM device
Who had the most points in game 81?
SELECT high_points FROM table_name_84 WHERE game = 81
What is the type of the player whose transfer fee was €20m?
SELECT type FROM table_13770460_3 WHERE transfer_fee = "€20M"
can you tell me the names of those wineries?
SELECT Winery FROM WINE GROUP BY Winery HAVING count ( * ) > = 4
What is the total of PI GP played by Anton Rodin with a Reg GP less than 0?
SELECT COUNT(pl_gp) FROM table_name_73 WHERE player = "anton rodin" AND reg_gp < 0
which episode was Transmitted on wednesday if the episode of "319 sucker punch" was transmitted on tuesday?
SELECT COUNT(wednesday) FROM table_18173916_8 WHERE tuesday = "319 Sucker Punch"
Among the customers who have ordered the product "Telescoping Adjustable Floor Lamp", how many of them are consumers?
SELECT COUNT(DISTINCT T1.`Customer Name`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.`Product Name` = 'Telescoping Adjustable Floor Lamp' AND T1.Segment = 'Consumer'
Name the most applications for 1986
SELECT MAX(applications) FROM table_20007413_3 WHERE year = "1986"
What day was the circuit Isle of Man?
SELECT date FROM table_name_72 WHERE circuit = "isle of man"
What race has a distance of 1200 m?
SELECT race FROM table_2062148_3 WHERE distance = "1200 m"
Count the total number of students.
SELECT count(*) FROM student
Which event is in round 1 with a record at 5-1?
SELECT event FROM table_name_28 WHERE round = 1 AND record = "5-1"
What is the average number of silver medals for rank 2 and more than 1 bronze medal?
SELECT AVG(silver) FROM table_name_15 WHERE rank = 2 AND bronze > 1
Who was the champion at berlin when the result was 2-0 with 100,000 fans in attendance?
SELECT champion FROM table_name_65 WHERE venue = "berlin" AND attendance = "100,000" AND result = "2-0"
How about males?
SELECT count ( * ) from people where sex = "M"
Who is the hero character of the adventure movie which was released on 2016/3/4?
SELECT T1.hero FROM characters AS T1 INNER JOIN movies_total_gross AS T2 ON T2.movie_title = T1.movie_title WHERE T2.genre = 'Adventure' AND T1.release_date = '4-Mar-16'
Name the most attendance for tamworth with home venue
SELECT MAX(attendance) FROM table_name_4 WHERE opponent = "tamworth" AND venue = "home"
What date is the 1:00 pm game at arrowhead stadium?
SELECT date FROM table_name_37 WHERE time___et__ = "1:00 pm" AND game_site = "arrowhead stadium"
What location airports is near by me has two airports? | What do you mean by near by you? Sorry, We cannot answer this. | what is the name of airport in the country Papua New Guinea
SELECT name FROM airports where country = 'Papua New Guinea'
What was the date of Circuit Hockenheimring and the winning manufacturer being Mercedes-Benz?
SELECT date FROM table_name_34 WHERE circuit = "hockenheimring" AND winning_manufacturer = "mercedes-benz"
What is the lowest ranking associated with a total of 23?
SELECT MIN(ranking) FROM table_name_51 WHERE total = 23
Find the name of the courses that do not have any prerequisite?
SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
What is the average scores of Tiramisu Kitchen in all inspections?
SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen'
I want the Grand Final Date for season 1988
SELECT grand_finaldate FROM table_name_40 WHERE season = 1988
How many male users are active in the events held on 5/1/2016?
SELECT COUNT(T3.gender) FROM app_events AS T1 INNER JOIN events_relevant AS T2 ON T2.event_id = T1.event_id INNER JOIN gender_age AS T3 ON T3.device_id = T2.device_id WHERE T1.is_active = 1 AND T3.gender = 'M' AND T2.timestamp LIKE '2016-05-01%'
Which countries have members?
SELECT distinct ( Country ) FROM member
Which country has the most members?
SELECT Country FROM member GROUP BY Country order by COUNT ( * ) desc limit 1
Which dorm has the largest capacity? | Hi do you need the dorm name or dorm id ? | dorm id , please.
SELECT dormid FROM dorm ORDER BY student_capacity DESC LIMIT 1
By how many strokes did Lema beat Jack Nicklaus?
SELECT margin_of_victory FROM table_name_16 WHERE runner_s__up = "jack nicklaus"
What are the names and birth dates of people, ordered by their names in alphabetical order?
SELECT Name , Birth_Date FROM people ORDER BY Name ASC
Cities that were opened before 2010 | Ah, I cannot understand. Do you mean cities that have branches opened before 2010? | Give me names of branches opened before 2010
SELECT name FROM branch WHERE open_year < 2010
How many active users are there in the event?
SELECT COUNT(app_id) FROM app_events WHERE is_active = 1
List the names of the top 5 oldest people.
SELECT Name FROM People ORDER BY Age DESC LIMIT 5
WHAT HOMETOWN DOES HE PLAY AS THE CATCHER FOR?
SELECT hometown FROM table_11677100_11 WHERE position = "Catcher"
How many students failed tests?
SELECT count ( distinct T1.student_id ) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
Show the flight number and distance of the flight with maximum price.
SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1
How many planes does Southwest Airlines Co. have?
SELECT COUNT(T3.TAIL_NUM) FROM ( SELECT T1.TAIL_NUM FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T2.Description = 'Southwest Airlines Co.: WN' GROUP BY T1.TAIL_NUM ) T3
How many artists are from Bangladesh?
SELECT count(*) FROM artist WHERE country = "Bangladesh"
Name the standard yarn weight system for 9 wpi
SELECT standard_yarn_weight_system FROM table_20297668_1 WHERE wraps_per_inch__wpi_ = "9 wpi"
Calculate the average number of male users who posted tweets in a week.
SELECT COUNT(DISTINCT T1.TweetID) / COUNT(DISTINCT T1.UserID) / 7 AS avg FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Day BETWEEN 1 AND 31