Database: movielens
Question: List down the ID of movies with running time of 3 and average revenue of 1?
SQL: SELECT T1.movieid FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid INNER JOIN directors AS T3 ON T2.directorid = T3.directorid WHERE T1.runningtime = 3 AND T3.avg_revenue = 1

Database: talkingdata
Question: What is the average age of all the vivo device users?
Evidence: average age = AVG(age); vivo device refers to phone_brand = 'vivo';
SQL: SELECT AVG(age) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'

Database: simpson_episodes
Question: Describe the birth country, height and person name who were not included in credit list with category of casting.
Evidence: height refers to height_meters; not in credit list refers to credited = ''; category of casting refers to category = 'Casting Department'
SQL: SELECT T1.birth_country, T1.height_meters, T1.name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Cast' AND T2.credited = 'false';

Database: law_episode
Question: How many stars did the episodes in which Donna Villella worked?
SQL: SELECT COUNT(T3.person_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T3.name = 'Donna Villella'

Database: simpson_episodes
Question: Among the episodes with excellent rating which were aired in 2008, describe the title, episode's image, award name and person who were nominated.
Evidence: excellent rating refers to 7 < = rating < = 10; aired in 2008 refers to SUBSTRACT(air_date, 0, 5) = '2008'; who were nominated refers to result = 'Nominee'
SQL: SELECT T2.title, T2.episode_image, T1.award, T1.person FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.rating BETWEEN 7 AND 10 AND SUBSTR(T2.air_date, 1, 4) = '2008' AND T1.result = 'Nominee';

Database: synthea
Question: For how long was Elly Koss required to take Acetaminophen?
Evidence: SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
SQL: SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description LIKE 'Acetaminophen%'

Database: language_corpus
Question: In Abadia, what is the word id of the of the Catalan language that appeared the highest amount of times? Indicate the how many times did they said word id appeared.
Evidence: Abadia refers to title = 'Abadia'; word id refers to wid; the highest amount of times refers to max(occurrences)
SQL: SELECT T2.wid, T2.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Abadia' ORDER BY T2.occurrences DESC LIMIT 1

Database: retails
Question: Which part and supplier have the most profit?
Evidence: part refers to p_name; supplier refers to s_name; the most profit refers to max(subtract(multiply(l_extendedprice, subtract(1, l_discount)), multiply(ps_supplycost, l_quantity)))
SQL: SELECT T3.p_name, T4.s_name FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey INNER JOIN supplier AS T4 ON T1.ps_suppkey = T4.s_suppkey ORDER BY T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity DESC LIMIT 1

Database: public_review_platform
Question: Which businesses with the category name Accessories have opening hours before 7AM?
Evidence: opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id;
SQL: SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Accessories' AND SUBSTR(T1.opening_time, -4, 2) * 1 < 7 AND T1.opening_time LIKE '%AM'

Database: music_platform_2
Question: Write all the review content belonging to StormCast: The Official Warhammer Age of Sigmar Podcast.
Evidence: review content refers to content; 'StormCast: The Official Warhammer Age of Sigmar Podcast' is the title of podcast;
SQL: SELECT content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'StormCast: The Official Warhammer Age of Sigmar Podcast' )

Database: regional_sales
Question: Please list the names of customers who have total orders of over 3 in 2018.
Evidence: total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';
SQL: SELECT DISTINCT IIF(COUNT(T2.CustomerID) > 3, T2.`Customer Names`, NULL) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._CustomerID HAVING COUNT(T2.CustomerID)

Database: bike_share_1
Question: What is the percentage ration of customers to subscribers that started their trips within the city of San Francisco?
Evidence: customer refers to subscription_type = 'customer'; subscriber refers to subscription_type = 'subscriber'; started their trips within refers to start_station_id; percentage ratio = DIVIDE(SUM(subscription_type = 'Customer'), SUM(subscription_type = 'Subscriber')) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T1.subscription_type = 'Customer' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.subscription_type = 'Subscriber' THEN 1 ELSE 0 END) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Francisco'

Database: food_inspection
Question: Which business had the most number of inspections? Give the Id number for that business.
Evidence: the most number of inspections refers to MAX(COUNT(business_id)); Id number for that business refers to business_id;
SQL: SELECT business_id FROM inspections GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1

Database: sales
Question: Has Alex purchased product with id 498?
Evidence: WHEN ProductID = 498 AND FirstName = 'Alex' means that Alex purchased a product; WHEN ProductID = 498 AND FirstName NOT 'Alex' means Alex has not purchased a product;
SQL: SELECT IIF(T1.ProductID = 498, 'YES', 'NO') FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Alex'

Database: movie_platform
Question: When did the creator of the list "250 Favourite Films" last updated a movie list?
Evidence: 250 Favourite Films refers to list_title; last update refers to list_update_date_utc;
SQL: SELECT T2.list_update_date_utc FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films' ORDER BY T2.list_update_date_utc DESC LIMIT 1

Database: food_inspection_2
Question: Which establishments did Joshua Rosa inspect?
Evidence: establishment name refers to dba_name
SQL: SELECT DISTINCT T3.dba_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'

Database: movie_platform
Question: What was the title of the first list created by a user 85981819? And please provide the user_avatar_image_url.
Evidence: user 85981819 refers to user_id = 85981819;  first list created refers to Min (list_creation_date_utc);
SQL: SELECT T2.list_title, T1.user_avatar_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_id = 85981819 ORDER BY T2.list_creation_timestamp_utc LIMIT 1