Database: video_games
Question: In games that can be played on Wii, what is the percentage of games released in 2007?
Evidence: Wii refers to platform_name = 'Wii'; percentage = MULTIPLY(DIVIDE(SUM(release_year = 2007), COUNT(release_year)), 100.0); released in 2007 refers to release_year = 2007;
SQL: SELECT CAST(COUNT(CASE WHEN T2.release_year = 2007 THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'Wii'

Database: books
Question: Write the full name of the customers whose address is at 55 Dorton Pass, Huangqiao.
Evidence: full name refers to first_name, last_name; '55' is the street_number, 'Dorton Pass' is the street_name; 'Huangqiao' is the city
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id WHERE T3.street_number = 55 AND T3.street_name = 'Dorton Pass' AND T3.city = 'Huangqiao'

Database: books
Question: Which city does the address id 547 belong to?
SQL: SELECT city FROM address WHERE address_id = 547

Database: retails
Question: Name customers in India with account balances over $5000.
Evidence: customer name refers to c_name; India refers to n_name = 'INDIA'; account balance over $5000 refers to c_acctbal > 5000
SQL: SELECT T1.c_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal > 5000 AND T2.n_name = 'INDIA'

Database: beer_factory
Question: What is the precise location of the place where Tommy Kono made a purchase in 2014?
Evidence: precise location = Latitude, Longitude; in 2014 refers to TransactionDate LIKE '2014%';
SQL: SELECT DISTINCT T1.Latitude, T1.Longitude FROM geolocation AS T1 INNER JOIN `transaction` AS T2 ON T2.LocationID = T1.LocationID INNER JOIN customers AS T3 ON T3.CustomerID = T2.CustomerID WHERE T3.First = 'Tommy' AND T3.Last = 'Kono' AND T2.TransactionDate LIKE '2014%'

Database: student_loan
Question: List out the organization joined and school enrolled by student27, student17 and student101?
Evidence: organization joined refers to organ
SQL: SELECT T1.school, T2.organ FROM enrolled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.`name` IN ('student27,student17,studetn101')

Database: movies_4
Question: What is the most common keyword among all the movies released in 2006?
Evidence: most common keyword refers to max(count(keyword_name)); movies released in 2006 refers to release_date LIKE '%2006%'
SQL: SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.release_date LIKE '2006%' GROUP BY T3.keyword_name ORDER BY COUNT(T3.keyword_name) DESC LIMIT 1

Database: movie
Question: Among the movies starring Tom Cruise, which one of them has the best quality?
Evidence: starring Tom Cruise refers to name = 'Tom Cruise'; best quality refers to max(rating)
SQL: SELECT T1.Title 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 T3.Name = 'Tom Cruise' ORDER BY T1.Rating DESC LIMIT 1

Database: airline
Question: Provide the air carrier description of all flights arriving at Miami.
Evidence: arriving at Miami refers to DEST = 'MIA';
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'MIA'

Database: law_episode
Question: Among the American casts, how many were uncredited on episode ID tt0629228?
Evidence: American refers to birth_country = 'USA'; cast refers to category = 'Cast'; uncredited refers to credited = ''
SQL: SELECT COUNT(T1.person_id) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.episode_id = 'tt0629228' AND T1.category = 'Cast' AND T1.credited = 'false' AND T2.birth_country = 'USA'

Database: image_and_language
Question: How many images have over 20 object samples?
Evidence: over 20 object samples refers to COUNT(OBJ_SAMPLE_ID) > 20
SQL: SELECT COUNT(T1.IMG_ID) FROM ( SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(OBJ_SAMPLE_ID) > 20 ) T1

Database: retails
Question: What is the total price of all orders from the customer with the phone number "627-220-3983"?
Evidence: total price = sum(o_totalprice); phone number "627-220-3983" refers to c_phone = '627-220-3983'
SQL: SELECT SUM(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_phone = '627-220-3983'

Database: world
Question: What is the life expectancy of residents in the most crowded city?
Evidence: most crowded city refers to MAX(Population);
SQL: SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC LIMIT 1

Database: airline
Question: What is the actual departure time of JetBlue Airways with the plane's tail number N903JB to Fort Lauderdale-Hollywood International Airport on the 20th of August 2018?
Evidence: actual departure time refers to DEP_TIME; JetBlue Airways refers to Description like '%JetBlue Airways%'; tail number refers to TAIL_NUM; TAIL_NUM = 'N903JB'; to refers to DEST; Fort Lauderdale-Hollywood International Airport refers to Description like '%Fort Lauderdale-Hollywood%'; on the 20th of August 2018 refers to FL_DATE = '2018/8/20';
SQL: SELECT T1.DEP_TIME FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code INNER JOIN Airports AS T3 ON T1.DEST = T3.Code WHERE T1.FL_DATE = '2018/8/20' AND T1.TAIL_NUM = 'N903JB' AND T2.Description LIKE '%JetBlue Airways%' AND T3.Description LIKE '%Fort Lauderdale-Hollywood%'

Database: soccer_2016
Question: List the IDs and names of the umpires from New Zealand.
Evidence: New Zealand refers to Country_Name = 'New Zealand'; ID of the umpire refers to Umpire_Id; name of the umpire refers to Umpire_Name
SQL: SELECT T1.Umpire_Id, T1.Umpire_Name FROM Umpire AS T1 INNER JOIN Country AS T2 ON T1.Umpire_Country = T2.Country_Id WHERE T2.Country_Name = 'New Zealand'

Database: world
Question: Who is the head of state of the country where the city of Pyongyang is under?
SQL: SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Pyongyang'

Database: bike_share_1
Question: What is the average duration of bike trips in the city of Palo Alto?
Evidence: DIVIDE(SUM(duration where city = 'Palo Alto'), COUNT(start_station_id));
SQL: SELECT AVG(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Palo Alto'

Database: retail_world
Question: Which company had the most orders in 1998?
Evidence: in 1998 refers to YEAR (OrderDate) = 1998; most orders = Max(Count(CustomerID)); company refers to CompanyName
SQL: SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1

Database: simpson_episodes
Question: What was the character that Dan Castellaneta did the voice over for and was awarded?
Evidence: voice over for and was awarded refers to award like '%Voice-Over%';
SQL: SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award LIKE '%Voice-Over%' AND T1.person = 'Dan Castellaneta';