sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the object whose attribute is blurry in image no.2377993? Give the explanation about the object.
SELECT T4.OBJ_CLASS_ID, T4.OBJ_CLASS FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T2.ATT_CLASS = 'blurry' AND T1.IMG_ID = 22377993
Can you give me the nationality of the ship with minimum tonnage.
SELECT Nationality FROM ship order by Tonnage limit 1
Calculate the average of 2020's population in each zip code.
SELECT CAST(SUM(population_2020) AS REAL) / COUNT(zip_code) FROM zip_data
What is the average score of the movie "The Fall of Berlin" in 2019?
SELECT SUM(T1.rating_score) / COUNT(T1.rating_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_timestamp_utc LIKE '2019%' AND T2.movie_title LIKE 'The Fall of Berlin'
How many of them have "Diana" anywhere in their name?
SELECT count ( customer_details ) FROM customers WHERE customer_details LIKE "%Diana%"
Who produced The simpson 20s: Season 20?
SELECT DISTINCT person FROM Credit WHERE role = 'producer';
What is To par, when Country is "Spain"?
SELECT to_par FROM table_name_47 WHERE country = "spain"
What is the title of the episode that received the lowest rating?
SELECT title FROM Episode ORDER BY rating LIMIT 1;
Among all the citation, what is the percentage of paper ID under the Agents classification?
SELECT CAST(COUNT(CASE WHEN class_label = 'Agents' THEN paper_id ELSE NULL END) AS REAL) * 100 / COUNT(paper_id) FROM paper
I want to know the average Fuml for Att of 5 and long more than 7
SELECT AVG(fuml) FROM table_name_13 WHERE att = 5 AND long > 7
What was the outcome of the game that had a score of 3–6, 6–3, 6–0?
SELECT outcome FROM table_name_81 WHERE score = "3–6, 6–3, 6–0"
What is the damage of storm three?
SELECT damage__millions_usd__ FROM table_name_58 WHERE storm_name = "three"
Return all the committees that have delegates from Democratic Party.
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic"
How many students play sports?
SELECT COUNT(DISTINCT StuID) FROM Sportsinfo
What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?
SELECT DISTINCT T1.name , T1.location , T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'
For all list titles with at least 200 movies in the list, what is their average number of followers?
SELECT AVG(list_followers) FROM lists WHERE list_movie_number > 200
What is the league name for the regular season status of 2nd, mid atlantic?
SELECT league FROM table_16636344_1 WHERE regular_season = "2nd, Mid Atlantic"
What Week 4 has a Week 2 of samantha speer?
SELECT week_4 FROM table_name_62 WHERE week_2 = "samantha speer"
Find the names of the customers who have order status both "On Road" and "Shipped".
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
Provide the name of artists who released at least two bootlegs in 2016.
SELECT artist FROM torrents WHERE groupYear = 2016 AND releaseType LIKE 'bootleg' GROUP BY artist HAVING COUNT(releaseType) > 2
Write the titles of horror films with a vote average of more than 7.
SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Horror' AND vote_average > 7
How many different types of settlements does Nova Pazova fall into?
SELECT COUNT(type) FROM table_2562572_53 WHERE settlement = "Nova Pazova"
when was the death when the birth was 8 december 1542?
SELECT death FROM table_name_45 WHERE birth = "8 december 1542"
What was the date of the game against seattle?
SELECT date FROM table_name_52 WHERE opponent = "seattle"
How many heads are temporary acting?
SELECT count ( * ) FROM management WHERE temporary_acting = 'Yes'
Show all the cinema names and opening years in descending order of opening year.
SELECT name, openning_year FROM cinema ORDER BY openning_year DESC
What is the 2013 BAFA adult flag division in Aylesbury?
SELECT 2013 AS _bafa_adult_flag_division FROM table_name_95 WHERE location = "aylesbury"
How many followers does Celine Dion have?
SELECT followers FROM user_profiles where name = "Celine Dion"
What are the names of all the stores in the largest district by population?
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
What is the date of birth of every customer whose status code is 'Good Customer'?
SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'
How many flights does airline 'JetBlue Airways' have?
SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways"
What are the medical encounter ids of patients who were born in Pembroke MA US?
SELECT DISTINCT T1.ENCOUNTER FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.birthplace = 'Pembroke MA US'
Find the names of all physicians and their primary affiliated departments' names.
SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1
What is the last name of the student who received an A in the class with the code 10018?
SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018
What are the titles of the papers?
SELECT title FROM papers
At which age did A Lamusi participate in 2012 Summer?
SELECT T2.age FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2012 Summer' AND T3.full_name = 'A Lamusi'
What was kumar sangakkara's average?
SELECT average FROM table_26041144_11 WHERE player = "Kumar Sangakkara"
What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?
SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7
When luz mcclinton is the name what is the season?
SELECT season FROM table_19061741_1 WHERE name = "Luz McClinton"
When Heather Christensen was featured in Week 2, who was the cyber girl for Week 3?
SELECT week_3 FROM table_name_11 WHERE week_2 = "heather christensen"
What is the race in the 8th position?
SELECT races FROM table_name_43 WHERE position = "8th"
What day did the platform sell 9.87 million units?
SELECT release_date FROM table_18590048_1 WHERE units_sold__in_millions_ = "9.87"
Who was nominated for outstanding director of a musical?
SELECT nominee FROM table_name_30 WHERE category = "outstanding director of a musical"
What is the name of the highest mountain?
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
What is the Termination of Mission date for Marsha E. Barnes, the Ambassador Extraordinary and Plenipotentiary?
SELECT termination_of_mission FROM table_name_34 WHERE title = "ambassador extraordinary and plenipotentiary" AND representative = "marsha e. barnes"
What are the tries against when they played against Bridgend?
SELECT MAX(tries_against) FROM table_16770037_3 WHERE team = Bridgend
How many routes end in a Canadian airport?
SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'
Which of those 5 distinct shops have the most happy hours? | Shop id 1 has the most happy hours | Can you tell me which shop ID offers the least happy hours?
SELECT shop_id FROM happy_hour group by shop_id order by count ( * ) asc limit 1
What was the sum of the years, when the entrant was Scuderia Centro Sud, and when there were 6 points?
SELECT SUM(year) FROM table_name_69 WHERE entrant = "scuderia centro sud" AND points = 6
how many laps have a time/retired of +1 lap and mark blundell is the driver?
SELECT AVG(laps) FROM table_name_85 WHERE time_retired = "+1 lap" AND driver = "mark blundell"
Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.
SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"
What is the total population of the neighborhoods Avondale Gardens, Irving Park, Kilbourn Park, Merchant Park, Old Irving Park, and The Villa?
SELECT SUM(T2.population) AS sum FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.neighborhood_name = 'Avondale Gardens' OR T1.neighborhood_name = 'Irving Park' OR T1.neighborhood_name = 'Kilbourn Park' OR T1.neighborhood_name = 'Merchant Park' OR T1.neighborhood_name = 'Old Irving Park' OR T1.neighborhood_name = 'The Villa'
For the 3-credit course with the easiest difficulty, how many students get an "A" in that course?
SELECT COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.credit = '3' AND T2.diff = 1
what is the date of birth of the employee named Ebba?
SELECT Date_of_Birth FROM Employees WHERE employee_name = "Ebba"
Which city of license has a frequency less than 100.1?
SELECT city_of_license FROM table_name_5 WHERE frequency_mhz < 100.1
What are the names and buildings of the deparments, sorted by budget descending?
SELECT dept_name , building FROM department ORDER BY budget DESC
And what year did the largest number of baseball players attend that college?
Select year from player_college where college_id = ( SELECT T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count ( * ) DESC LIMIT 1 ) group by college_id order by year desc limit 1
Show all customer ids and the number of accounts for each customer.
SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id
How many films are there under the category of "Horror"?
SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Horror'
What is the season date if the minor (South) winners is Bristol Sanctuary XI?
SELECT season FROM table_23014923_1 WHERE minor__south__winners = "Bristol Sanctuary XI"
Name the score in the final for january 12, 2013
SELECT score_in_the_final FROM table_name_63 WHERE date = "january 12, 2013"
What is the Result of the game on October 3?
SELECT result FROM table_name_49 WHERE date = "october 3"
How many actors have starred in the film ACADEMY DINOSAUR?
SELECT COUNT(T1.actor_id) FROM film_actor AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id WHERE T2.title = 'ACADEMY DINOSAUR'
Of the names listed in the table, which of them have an item status listed as "cancel"?
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = "Cancel" AND T4.product_name = "food" GROUP BY T1.customer_id HAVING count ( * ) > = 1
What is the number of finishes associated with an elimination of Adriana?
SELECT COUNT(finish) FROM table_24122653_2 WHERE eliminated = "Adriana"
What is the grade of CID 550.681? | Did you mean the grades of students who enrolled in the course with CID 550.681? | YES
SELECT grade from enrolled_in where cid = "550.681"
Please list all the biwords pairs with "àbac" as its first word.
SELECT T1.word AS W1, T3.word AS W2 FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'àbac'
What is the year 2013 with a total of 5, and 5th in 2009?
SELECT 2013 FROM table_name_78 WHERE total = 5 AND 2009 = "5th"
What is the general description for case number JB106010?
SELECT T1.primary_description FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.case_number = 'JB106010'
Which 2012 has a 2007 of 0 / 4?
SELECT 2012 FROM table_name_8 WHERE 2007 = "0 / 4"
List the name of products in ascending order of price.
SELECT Product_Name FROM Products ORDER BY Product_Price ASC
Which Norwegian (nynorsk) has a Danish of farvel?
SELECT norwegian__nynorsk_ FROM table_name_12 WHERE danish = "farvel"
What team(s) played in the 1995-96 season?
SELECT teams FROM table_name_46 WHERE season = "1995-96"
What is the date of enrollment in the course named "operating system"?
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "operating system"
List at least 5 customers who paid greater than $10. Provide the full name of the customers.
SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.amount > 10
what is the count for Naiman?
SELECT count ( * ) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.Fname = "Naiman"
Tell me the prices of Dining | Sorry, there is no product named "Dining". There is, however, a product named "Dinning". This might be a typo. Do you want to know the prices of "Dinning"? | Tell me the prices of Dinning
SELECT Product_Price FROM Products WHERE Product_Name = "Dinning"
What's the storage case of the buttonholer described as ivory and red metal?
SELECT storage_case FROM table_28652521_1 WHERE description = "ivory and red metal"
What are the employee ids of the employees whose role name is "Human Resource" or "Manager"?
SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?
SELECT T2.emp_fname , T4.prof_office , T3.crs_description , T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code
How many flights departed on time on 8/1/2018?
SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND DEP_DELAY <= 0
Who was the Winner when the Runner-up was Real Salt Lake?
SELECT winner FROM table_name_20 WHERE runner_up = "real salt lake"
Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.
SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1
What star rating is the most common for beers containing corn syrup?
SELECT T2.StarRating FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.CornSyrup = 'TRUE' GROUP BY T2.StarRating ORDER BY COUNT(T2.StarRating) DESC LIMIT 1
What country is the film directed by Jean-Luc Godard in French from?
SELECT country FROM table_name_19 WHERE language = "french" AND director = "jean-luc godard"
For all authors from CA who are not on contract, which title of his/hers has the most year to date sales.
SELECT T1.title 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 AND T3.state = 'CA' ORDER BY T1.ytd_sales DESC LIMIT 1
Which Game has a Streak of loss 1, and a Score of 110–111?
SELECT game FROM table_name_80 WHERE streak = "loss 1" AND score = "110–111"
What was the total time for the match that ocurred in Round 3 with opponent Keith Wisniewski?
SELECT time FROM table_name_39 WHERE round = "3" AND opponent = "keith wisniewski"
what builder is now retired
SELECT pennant_number FROM table_name_20 WHERE current_status = "retired"
What date was the away team from Adelaide?
SELECT date FROM table_name_37 WHERE away_team = "adelaide"
What is the position with a neutral H/A/N and more than 2 innings?
SELECT AVG(pos) FROM table_name_93 WHERE h_a_n = "neutral" AND inn > 2
when does the train arriving at stamford east at 11.45 departure
SELECT departure FROM table_18333678_2 WHERE arrival = "11.45" AND going_to = "Stamford East"
Show the average, maximum, minimum enrollment of all schools.
SELECT avg(enrollment) , max(enrollment) , min(enrollment) FROM school
What is the average of the top-25 with 16 cuts and less than 23 events?
SELECT AVG(top_25) FROM table_name_79 WHERE cuts_made = 16 AND events < 23
How many times longer is the longest border in the United States than the shortest?
SELECT MAX(T2.Length) / MIN(T2.Length) FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country2 WHERE T1.Name = 'United States'
Now please list all unique product type codes
SELECT DISTINCT product_type_code FROM Products
Find the name and country of origin for all artists who have release at least one song of resolution above 900.
SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1
Which clubs are located at "AKW"? Return the club names.
SELECT clubname FROM club WHERE clublocation = "AKW"
and what is their total market value in billions?
SELECT sum ( Market_Value_in_Billion ) FROM company WHERE Industry = "Banking" OR Industry = "Retailing"
Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.
SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count ( * ) = 2 INTERSECT SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count ( * ) < 2