Database: donor
Question: What is the title of project that have the most expensive funds?
Evidence: the most expensive funds refers to max(multiply(item_unit_price, item_quantity))
SQL: SELECT T1.title FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.projectid = ( SELECT projectid FROM resources ORDER BY item_unit_price * item_quantity DESC LIMIT 1 )

Database: movie_platform
Question: For the user who post the list that contained the most number of the movies, is he/she a paying subscriber when creating that list?
Evidence: the list that contained the most number of the movies refers to MAX(list_movie_number); user_has_payment_method = 1 means the user was a paying subscriber when he created the list ; 
user_has_payment_method = 0 means the user was not a paying subscriber when he created the list 


SQL: SELECT T1.user_has_payment_method FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_movie_number = ( SELECT MAX(list_movie_number) FROM lists )

Database: synthea
Question: Name the patients who had an allergy to soy.
Evidence: allergy to soy refers to allergies where DESCRIPTION = 'Allergy to soya';
SQL: SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to soya'

Database: talkingdata
Question: What is the ratio of female users to male users who uses a vivo device?
Evidence: ratio = DIVIDE(SUM(gender = 'M' WHERE phone_brand = 'vivo'), SUM(gender = 'F' WHERE phone_brand = 'vivo')); female refers to gender = 'F'; male refers to gender = 'M'; vivo device refers to phone_brand = 'vivo';
SQL: SELECT SUM(IIF(T1.gender = 'M', 1, 0)) / SUM(IIF(T1.gender = 'F', 1, 0)) AS per 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: student_loan
Question: List the names of disabled students enlisted in the navy.
Evidence: navy refers to organ = 'navy';
SQL: SELECT T1.name FROM enlist AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.organ = 'navy'

Database: donor
Question: Which city does the school that project "iMath" donated to in?
Evidence: iMath is the title; city refers to school_city;
SQL: SELECT T1.school_city FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'iMath'

Database: movie
Question: Count the male actors born in USA that starred in Ghost.
Evidence: male refers to Gender = 'Male'; born in USA refers to Birth Country = 'USA'; Ghost refers to Title = 'Ghost'
SQL: SELECT COUNT(*) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Ghost' AND T3.Gender = 'Male' AND T3.`Birth Country` = 'USA'

Database: shakespeare
Question: How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."?
SQL: SELECT SUM(T2.ParagraphNum) FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T1.Description = 'A Sea-port in Cyprus. An open place near the quay.'

Database: simpson_episodes
Question: What are the keywords of the least popular episode?
Evidence: least popular episode refers to MIN(votes)
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id ORDER BY T1.votes LIMIT 1;

Database: shipping
Question: Name the customer who sent the shipment to Oak Park.
Evidence: "Oak Park" is the city_name; customer name refers to cust_name
SQL: SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T1.city_id WHERE T3.city_name = 'Oak Park'

Database: retail_world
Question: What are the most popular confections product and calculate the total sales generated by this product?
Evidence: most popular confections product refers to ProductID = max(count(MULTIPLY(Quantity, UnitPrice))) from CategoryName = 'Confections' ;  total sales refers to sum(MULTIPLY(Quantity, UnitPrice))
SQL: SELECT COUNT(T1.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T1.ProductID = T3.ProductID WHERE T2.CategoryName = 'Confections' GROUP BY T3.Quantity ORDER BY T3.Quantity DESC LIMIT 1

Database: beer_factory
Question: What is the precise location of all paying customers with American Express?
Evidence: precise location refers to Latitude, Longitude; American Express refers to CreditCardType = 'American Express';
SQL: SELECT DISTINCT T2.Latitude, T2.Longitude FROM `transaction` AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.CreditCardType = 'American Express'

Database: regional_sales
Question: Name the sales team name who had orders with the greatest net profit in 2020.
Evidence: net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the greatest net profit in 2020 refers to MAX(net profit) where OrderDate LIKE '%/20';
SQL: SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 1

Database: public_review_platform
Question: How many businesses in Phoenix, Arizona is attributed to waiter service?
Evidence: 'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services'
SQL: SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.city LIKE 'Phoenix' AND T3.attribute_name LIKE 'waiter_service' AND T2.attribute_id = 2

Database: codebase_comments
Question: What is the id of the repository with the highest number of solution path?
Evidence: highest number of solution path refers to max(count(Path)); id of the repository refers to RepoId
SQL: SELECT RepoId FROM solution GROUP BY RepoId ORDER BY COUNT(Path) DESC LIMIT 1

Database: professional_basketball
Question: What is the percentage of offense rebounds from the total rebounds of the players in year 2000.
Evidence: in year 2000 refers to year = 2000; percentage = divide(sum(o_rebounds), sum(rebounds)) * 100%
SQL: SELECT CAST(SUM(T2.o_rebounds) AS REAL) * 100 / SUM(T2.rebounds) FROM players_teams AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2000

Database: european_football_1
Question: What is the name of all the teams that played in the EFL League One division?
Evidence: all the teams include both HomeTeam and AwayTeam; name = 'EFL League One'; DIV = 'E2';
SQL: SELECT T1.HomeTeam,T1.AwayTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div=T2.division WHERE T2.name = 'EFL League One' and T1.Div = 'E2'

Database: public_review_platform
Question: Please indicate the business id have the closing time with the category of Arts & Entertainment on Sunday.
Evidence: Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment';
SQL: SELECT T1.business_id, T3.closing_time FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Arts & Entertainment' AND T4.day_of_week = 'Sunday'

Database: movie_platform
Question: Please list the movies rated by the user who created the movie list "250 Favourite Films".
Evidence: 250 Favourite Films' is list_title; movies refers to movie_title;
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T3.list_title = '250 Favourite Films'