sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which series number has the production code 7.07? | SELECT COUNT(no_in_series) FROM table_2226817_8 WHERE production_code = "7.07" |
what is the name of the camera lens in the mountains id 2? | SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id WHERE T1.mountain_id = 2 |
Provide the inspection ID of the inspection with the comment "MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA" and sanitary operating requirement code of 7-38-030, 015, 010 (A), 005 (A). | SELECT T2.inspection_id FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.inspector_comment = 'MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA' AND T1.code = '7-38-030, 015, 010 (A), 005 (A)' |
Can you tell me the lowest Games that has the Pts/game larger than 1.4 and the Points of 20, and the Name of susan day? | SELECT MIN(games) FROM table_name_96 WHERE pts_game > 1.4 AND points = 20 AND name = "susan day" |
Who left office in June 2011? | SELECT name FROM table_name_1 WHERE left_office = "june 2011" |
what is its elevation? | SELECT elevation FROM airports ORDER BY elevation DESC LIMIT 1 |
Show the name, open date, and organizer for all churches. | SELECT name , open_date , organized_by FROM Church |
What class is the dodge dealers grand prix? | SELECT class FROM table_name_23 WHERE race = "the dodge dealers grand prix" |
What is the name of the most common genre in all tracks? | SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1 |
In the year 1958, what is the total number of players that became hall of famers? | SELECT COUNT(hofID) FROM HOF WHERE category = 'Player' AND year = 1958 |
What are the names and genders of staff who were assigned in 2016? | SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE "2016%" |
What is the Q1+Q2 time for the driver whose Q1 time was 1:14.819, ? | SELECT q1 + q2_time FROM table_name_51 WHERE q1_time = "1:14.819" |
Points larger than 108, and a Wins of 0, and a Rank smaller than 8, and a Manufacturer of honda is what rider? | SELECT rider FROM table_name_64 WHERE points > 108 AND wins = 0 AND rank < 8 AND manufacturer = "honda" |
how many postseason on the table | SELECT count ( * ) FROM postseason |
For that table, can you sort by descending count? | SELECT T1.teacher_id , count ( * ) FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id order by count ( * ) desc |
What are the cities in Colorado that have post codes starting with 4. | SELECT city FROM addresses WHERE zip_postcode LIKE "4%" and state_province_county = "Colorado" |
What is the margin of victory for the winning score of −10 (71-65-68-70=274)? | SELECT margin_of_victory FROM table_name_78 WHERE winning_score = −10(71 - 65 - 68 - 70 = 274) |
Yes | SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY count ( * ) DESC LIMIT 1 |
Show locations and nicknames of schools. | SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID |
Show names of technicians who are assigned to repair machines with value point more than 70. | SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70 |
Find the name of physicians who are in charge of more than one patient. | SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1 |
May I have a list of authors? | SELECT Author FROM submission |
What position does a Keith Shologan, who was picked higher than 6, play? | SELECT position FROM table_name_91 WHERE pick__number < 6 AND player = "keith shologan" |
What is the position of the 9th oldest hockey player? | SELECT pos FROM Master WHERE birthYear IS NOT NULL ORDER BY birthYear, birthMon, birthDay LIMIT 8 |
What is the sources for Bandung? | SELECT sources_of_pop___area FROM table_name_37 WHERE city = "bandung" |
Which country is University of Veterinary Medicine Vienna located in? Give its country id. | SELECT country_id FROM university WHERE university_name = 'University of Veterinary Medicine Vienna' |
When the Winning score was –9 (69-72-68-70=279), what was the Margin of victory? | SELECT margin_of_victory FROM table_name_66 WHERE winning_score = –9(69 - 72 - 68 - 70 = 279) |
What is the station with a number greater than 9 and a distance of 16.4 km? | SELECT station FROM table_name_10 WHERE number > 9 AND distance__km_ = 16.4 |
How many customers are there? | SELECT COUNT ( * ) FROM CUSTOMER |
Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in. | SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID |
what is the attendance when the home team is chester city? | SELECT attendance FROM table_name_51 WHERE home_team = "chester city" |
What is Geelong's home team score? | SELECT home_team AS score FROM table_name_89 WHERE home_team = "geelong" |
What was the venue of the match where team 2 was pea and the score was 1:3? | SELECT venue FROM table_name_59 WHERE team_2 = "pea" AND score = "1:3" |
Which Platform is the one that has a Stop number of 99014? | SELECT platform FROM table_name_28 WHERE stop_no = "99014" |
How many written by have wendey stanzler as the director? | SELECT COUNT(written_by) FROM table_22570439_1 WHERE directed_by = "Wendey Stanzler" |
Who is the second when Mikkel Krause is the third? | SELECT second FROM table_name_18 WHERE third = "mikkel krause" |
Which CFL team drafted a pick from Boston College? | SELECT cfl_team FROM table_name_5 WHERE college = "boston college" |
Show institution names along with the number of proteins for each institution. | SELECT T1.institution , count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id |
What was the terrain for stage 10 of the tour? | SELECT terrain FROM table_name_69 WHERE stage = "10" |
What's the total failures among rockets that had more than 3 successes, type ariane 5 and more than 0 partial failures? | SELECT COUNT(failures) FROM table_name_92 WHERE successes > 3 AND type = "ariane 5" AND partial_failures > 0 |
What Date has the Region Europe and a Catalog of 74321 45851 2? | SELECT date FROM table_name_33 WHERE region = "europe" AND catalog = "74321 45851 2" |
List all the names of products with the special offer "15". | SELECT T2.Name FROM SpecialOfferProduct AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SpecialOfferID = 15 |
Which continent is Anguilla in? | SELECT Continent FROM country WHERE Name = "Anguilla" |
What is the Chinese name of the episode with 1.97 million Hong Kong viewers? | SELECT chinese_title FROM table_24856090_1 WHERE hk_viewers = "1.97 million" |
What is the current income inequality for the country of Seychelles? | SELECT income_inequality_1994_2011__latest_available_ FROM table_name_15 WHERE country = "seychelles" |
What's the Date for the Label of Bertelsmann Music group and has a Region of Europe? | SELECT date FROM table_name_36 WHERE label = "bertelsmann music group" AND region = "europe" |
List all the disabled female students. | SELECT T1.name FROM disabled AS T1 INNER JOIN male AS T2 ON T1.name <> T2.name |
Which Result has a Venue of home, and a Date of 3 october 1987? | SELECT result FROM table_name_54 WHERE venue = "home" AND date = "3 october 1987" |
List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers. | SELECT customer_name , customer_phone , customer_email FROM Customers ORDER BY date_became_customer |
Add a column for monthly rental to the table Addresses | i cannot understand your question, can you give more information? thanks | What's the highest monthly rental in the table Student Addresses? | select monthly_rental from Student_addresses order by monthly_rental desc limit 1 |
How many laps were ridden in the race that had a Time/Retired of +37.351? | SELECT COUNT(laps) FROM table_name_24 WHERE time_retired = "+37.351" |
Show the different headquarters and number of companies at each headquarter. | SELECT Headquarters , COUNT(*) FROM company GROUP BY Headquarters |
What is the birth name of the person who voiced 'Helen Lovejoy?' | SELECT DISTINCT T1.birth_name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'Helen Lovejoy'; |
Which problems are reported by the staff with first name "Christop"? Show the descriptions of the problems. | SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" |
How many seats does the 6th Dail have? | SELECT COUNT(seats) FROM table_name_72 WHERE dáil = "6th" |
What is Date, when Athlete is "Yussuf Alli"? | SELECT date FROM table_name_15 WHERE athlete = "yussuf alli" |
What are the formats for the songs with a resolution below 800? | SELECT T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 |
What was the undecided with Roy Barnes at 47%? | SELECT undecided FROM table_name_22 WHERE roy_barnes = "47%" |
What was the result of the syracuse grand prix? | SELECT result FROM table_name_80 WHERE event = "syracuse grand prix" |
How many cars worth greater than 40000 were from the USA? | SELECT COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'USA' AND T1.price > 40000 |
How many minority leaders have not been registered in Federal Election Commission data? | SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.title = 'Minority Leader' AND (T1.fec_id IS NULL OR T1.fec_id = '') |
Who was the trainer with Robert Courtney was owner? | SELECT trainer FROM table_name_8 WHERE owner = "robert courtney" |
Which organization does student 313 belong to? | SELECT organ FROM enlist WHERE name = 'studenT113' |
Who is the winner in the location of ljvm coliseum • winston-salem, nc? | SELECT winner FROM table_21330550_2 WHERE location = "LJVM Coliseum • Winston-Salem, NC" |
what is the number of attendance on june 24 | SELECT COUNT(attendance) FROM table_name_8 WHERE date = "june 24" |
What is the time for Adi Bichman? | SELECT time FROM table_name_28 WHERE name = "adi bichman" |
What are the names of directors who directed movies with 5 star rating? Also return the title of these movies. | SELECT T1.director , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5 |
Which letter has an operator of VeriSign and an AS-number of AS26415? | SELECT letter FROM table_name_45 WHERE operator = "verisign" AND as_number = "as26415" |
Find the city with the largest population that uses English. | SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = "English" ORDER BY T1.Population DESC LIMIT 1 |
Awesome! Which of these hometowns is the most common? | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT ( * ) DESC LIMIT 1 |
What is the average Singapore value with a London value less than 0? | SELECT AVG(singapore) FROM table_name_80 WHERE london < 0 |
What is the review length of user 11021 to business with business ID 3? | SELECT review_length FROM Reviews WHERE user_id = 11021 AND business_id = 3 |
List out the long name of countries using series code as DT.DOD.DSTC.CD | SELECT T1.LongName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'DT.DOD.DSTC.CD' |
How many entries are there for type for the cyrillic name other names is падина (slovak: padina)? | SELECT COUNT(type) FROM table_2562572_43 WHERE cyrillic_name_other_names = "Падина (Slovak: Padina)" |
What is the weekly average number of fraud incidents that were reported in January 2018? Provide the description of the location where the majority of fraud incidents occurred in the said month. | SELECT CAST(COUNT(T1.fbi_code_no) AS REAL) / 4 FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' |
WHAT IS THE HIGHEST LENGTH OF ROLL COASTER | select max ( Length ) from roller_coaster |
What is the zip code in which the average mean sea level pressure is the lowest? | SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1 |
What is the rank of the country with more than 2 medals, and 2 gold medals? | SELECT rank FROM table_name_83 WHERE total > 2 AND gold = 2 |
Which Drawn is the highest one that has a Played smaller than 18? | SELECT MAX(drawn) FROM table_name_36 WHERE played < 18 |
What is the title, phone number and hire date for the employee named Nancy Edwards? | SELECT title , phone , hire_date FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
Name the resolution for dish of 5270 | SELECT resolution FROM table_name_36 WHERE dish = "5270" |
What is the Location of the Mill Built in the Early 19th Century? | SELECT location FROM table_name_50 WHERE built = "early 19th century" |
What are the names of the person that were not credited at the end of episode tt0629391? | SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.credited = 'false' AND T1.episode_id = 'tt0629391' |
Which wines are made of Red color grapes? | Here are the wine names for wine made of Red color grapes. | Out of them which have prices higher than 50? | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 |
What is the average age of employee in Adventure Works? | SELECT AVG(STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', BirthDate)) FROM Employee |
Who was the coach of the Pandas when their overall record was 20-6-2? | SELECT coach FROM table_27069503_2 WHERE overall = "20-6-2" |
What office was law preservation ticket holder William E. Barron running for? | SELECT office FROM table_name_51 WHERE law_preservation_ticket = "william e. barron" |
What is the Competition name of the competition that ended with a score of 2-1? | SELECT competition FROM table_name_74 WHERE score = "2-1" |
Which employees do not destroy any document? Find their employee ids. | SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed |
Who was the developer of Call of Duty: Black Ops? | SELECT developer_s_ FROM table_name_46 WHERE game = "call of duty: black ops" |
Which Location has a Date of 1931-02-02? | SELECT location FROM table_name_44 WHERE date = "1931-02-02" |
List the categories of all active businesses that were not in Arizona. | SELECT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.active LIKE 'TRUE' AND T1.state NOT LIKE 'AZ' |
Name the least wins for 6 points | SELECT MIN(wins) FROM table_name_69 WHERE points = 6 |
Show all document ids and the number of paragraphs in each document. Order by document id. | SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id |
Show the name and phone of the customer without any mailshot. | SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM mailshot_customers) |
Find the names of the chip models that are not used by any phone with full accreditation type. | SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full' |
Which career win-loss record has a 1r in 2002, a 2r in 2000 and a 2r in 2001? | SELECT career_win_loss FROM table_name_75 WHERE 2002 = "1r" AND 2000 = "2r" AND 2001 = "2r" |
What is the date of the game where Collingwood was the home team? | SELECT date FROM table_name_31 WHERE home_team = "collingwood" |
give me the age of all the people in the mangement | SELECT T1.age from head as T1 Join management as t2 on t1.head_id = t2.head_id |
What is them two (the two) when you and i is ngœbalngu? | SELECT them_two__the_two_ FROM table_1015914_24 WHERE you_and_i = "ngœbalngu" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.