Database: beer_factory
Question: Which brand of root beer was highly rated by customers?
Evidence: brand of root beer refers to BrandName; highly rated refers to MAX(COUNT(StarRating = 5));
SQL: SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5

Database: image_and_language
Question: Calculate the average number of images with an attribute class of "keyboard".
Evidence: AVG(IMG_ID) where OBJ_CLASS = 'keyboard';
SQL: SELECT AVG(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard'

Database: movie_platform
Question: What's the url of user 39115684's rating on the movie 'When Will I Be Loved'?
Evidence: A Way of Life refers to movie_title; user 39115684 refers to userid = 39115684;  url refers to rating_url;
SQL: SELECT T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.user_id = 39115684

Database: movie_3
Question: Among the films that the customer RUTH MARTINEZ has rented, how many of them are released in 2006?
Evidence: release in 2006 refers to release_year = 2006
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.release_year = 2006 AND T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'

Database: shooting
Question: Which near-death incident did a policeman by the name of Ruben Fredirick look into? What is the victim in this incident's race and gender?
Evidence: near-death refers to subject_statuses = 'Deceased Injured'; incident refers to case_number; Ruben Fredirick refers to full_name = 'Ruben Fredirick'
SQL: SELECT T1.case_number, T3.race, T3.gender FROM incidents AS T1 INNER JOIN officers AS T2 ON T1.case_number = T2.case_number INNER JOIN subjects AS T3 ON T1.case_number = T3.case_number WHERE T2.first_name = 'Fredirick' AND T2.last_name = 'Ruben'

Database: authors
Question: In papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0?
Evidence: journal ID of 200 to 300 refers to JournalId BETWEEN 200 AND 300; short name starts with A refers to ShortName LIKE 'A%'; Percentage = Divide (Count(ConferenceId = 0), Count(ConferenceId)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%'

Database: beer_factory
Question: How many purchases were made at Sac State American River Courtyard using Master Card?
Evidence: Sac State American River Courtyard refers to LocationName = 'Sac State American River Courtyard'; Master Card refers to CreditCardType = 'MasterCard';
SQL: SELECT COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State American River Courtyard' AND T1.CreditCardType = 'MasterCard'

Database: retails
Question: How many Japanese suppliers have their accounts in debt?
Evidence: Japanese refers to n_name = 'Japan'; have accounts in debt refers to s_acctbal < 0
SQL: SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 AND T2.n_name = 'JAPAN'

Database: authors
Question: Please provide the full name of the conference where one of the papers of Jean-luc Hainaut were published.
Evidence: papers of Jean-luc Hainaut refers to Name = 'Jean-luc Hainaut'
SQL: SELECT DISTINCT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T2.Name = 'Jean-luc Hainaut' LIMIT 1

Database: public_review_platform
Question: Under the category name of "Coffee & Tea", mention any 5 business ID , their state and city.
SQL: SELECT T2.business_id, T3.state, T3.city FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Coffee & Tea' LIMIT 5

Database: retail_world
Question: How many employees from USA with Sales Representative title?
Evidence: from USA refers to Country = 'USA'
SQL: SELECT COUNT(Country) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative'

Database: shipping
Question: How much more pounds in total were transported to New York than to Chicago?
Evidence: "New York" and "Chicago" are both city_name; more pounds in total refers to Subtract (Sum(weight where city_name = 'New York'), Sum(weight where city_name = 'Chicago'))
SQL: SELECT SUM(CASE WHEN T2.city_name = 'New York' THEN T1.weight ELSE 0 END) - SUM(CASE WHEN T2.city_name = 'Chicago' THEN T1.weight ELSE 0 END) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id

Database: codebase_comments
Question: Among the solutions that contain files within the repository followed by over 1000 people, how many of them can be
implemented without needs of compilation?
Evidence: followed by over 1000 people refers to Forks >1000; can be
implemented without needs of compilation refers to WasCompiled = 1;
SQL: SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks > 1000 AND T2.WasCompiled = 1

Database: disney
Question: Provide the director's name of Wreck-It Ralph movie.
Evidence: Wreck-It Ralph is the name of the movies which refers to name = 'Wreck-It Ralph';
SQL: SELECT director FROM director WHERE name = 'Wreck-It Ralph'

Database: movie_3
Question: Mention the language of Untouchables Sunrise film and calculate its rental cost per day.
Evidence: "UNTOUCHABLES SUNRISE" is the title of film; language refers to name; rental cost per day = Divide (rental_cost, rental_duration)
SQL: SELECT T2.name, T1.replacement_cost / T1.rental_duration AS cost FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'UNTOUCHABLES SUNRISE'

Database: video_games
Question: Give the number of games which were published by Ascaron Entertainment GmbH.
Evidence: published by Ascaron Entertainment GmbH refers to publisher_name = 'Ascaron Entertainment GmbH'
SQL: SELECT COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id WHERE T1.publisher_name = 'Ascaron Entertainment GmbH'

Database: synthea
Question: What is the percentage of female patients who started the care plan in 2010?
Evidence: female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
SQL: SELECT CAST(SUM(CASE WHEN T2.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.PATIENT) AS percentage FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE strftime('%Y', T1.START) = '2010'

Database: movielens
Question: Which movies have received the greatest ratings from female users whose occupations fall within the category of 3?
Evidence: Female users mean that u_gender = 'F'
SQL: SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.u_gender = 'F' AND T1.occupation = 3 AND T2.rating = 5