Database: shipping
Question: How many cities which belong to New Jersey have transported weight greater than 20000?
Evidence: "New Jersey" is the state; transported weight greater than 20000 refers to Sum(weight) > 20000
SQL: SELECT COUNT(*) FROM ( SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'New Jersey' GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000 )

Database: car_retails
Question: What is the total actual profit gained from orders made by American customers from 2003-01-06 to 2005-05-09?
Evidence: total actual profit = SUM(SUBTRACT(priceEach, buyPrice)); American is a nationality of country = 'USA'; orderDate BETWEEN '2003-01-06' AND '2005-05-09';
SQL: SELECT SUM(T2.priceEach - T1.buyPrice) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T3.orderDate > '2003-01-05' AND T3.orderDate < '2005-05-10'

Database: movie_3
Question: Name the movie with the highest rental revenue among the shortest films.
Evidence: movie name refers to title; the highest rental revenue refers to max(multiply(rental_duration, rental_rate)); the shortest film refers to min(length)
SQL: SELECT title FROM film WHERE length = ( SELECT MIN(length) FROM film ) ORDER BY rental_duration * rental_rate DESC LIMIT 1

Database: image_and_language
Question: How many attributes are related to the object sample no. 7 on image no. 4?
Evidence: How many attributes refers to ATT_CLASS_ID; object sample no. 7 on image no. 4 refers to IMG_ID = 4 and OBJ_SAMPLE_ID = 7
SQL: SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_ATT WHERE IMG_ID = 4 AND OBJ_SAMPLE_ID = 7

Database: movie_3
Question: Describe the full names and cities of the customers who rented "DREAM PICKUP".
Evidence: full name refers to first_name, last_name; 'DREAM PICKUP' is a title of film
SQL: SELECT T4.first_name, T4.last_name, T6.city FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN customer AS T4 ON T3.customer_id = T4.customer_id INNER JOIN address AS T5 ON T4.address_id = T5.address_id INNER JOIN city AS T6 ON T5.city_id = T6.city_id WHERE T1.title = 'DREAM PICKUP'

Database: retails
Question: What is the name of the customer with the highest amount of debt?
Evidence: customer with the highest amount of debt refers to c_name where MIN(c_acctbal);
SQL: SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer )

Database: shipping
Question: What is the area of the destination city of shipment No.1346?
Evidence: shipment no. 1346 refers to ship_id = 1346
SQL: SELECT T2.area FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1346'

Database: retail_complains
Question: How many clients who live in New York City submitted their complaints via fax?
Evidence: submitted complaints via fax refers to "Submitted via" = 'Fax';
SQL: SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'New York City' AND T2.`Submitted via` = 'Fax'

Database: address
Question: How many counties are there in Virginia State?
Evidence: "Virginia" is the state
SQL: SELECT COUNT(T2.county) FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Virginia'

Database: university
Question: List the ranking criteria under the Shanghai Ranking system.
Evidence: Shanghai Ranking system refers to system_name = 'Shanghai Ranking'; ranking criteria refers to criteria_name
SQL: SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Shanghai Ranking'

Database: social_media
Question: What is the total number of tweets sent by male users on Mondays?
Evidence: male user refers to Gender = 'Male; 'Monday' is the Weekday; total number of tweet refers to Count (TweetID)
SQL: SELECT COUNT(DISTINCT T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Weekday = 'Monday'

Database: retails
Question: What are the top 2 countries with the highest number of indebted suppliers?
Evidence: country refers to c_name; highest number of indebted refers to max(sum(acctbal)) where s_acctbal < 0
SQL: SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T1.s_nationkey ) AS T ORDER BY T.num LIMIT 2

Database: menu
Question: List down the locations of menu sponsored by Norddeutscher Lloyd Bremen.
Evidence: sponsored by Norddeutscher Lloyd Bremen refers to sponsor = 'Norddeutscher Lloyd Bremen';
SQL: SELECT location FROM Menu WHERE sponsor = 'Norddeutscher Lloyd Bremen'

Database: image_and_language
Question: What is the ratio between the number of object samples in image 1 and the number of object samples in image 6?
Evidence: DIVIDE(SUM(OBJ_SAMPLE_ID where IMG_ID = 1), SUM(OBJ_SAMPLE_ID where IMG_ID = 6));
SQL: SELECT CAST(SUM(CASE WHEN IMG_ID = 1 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN IMG_ID = 6 THEN 1 ELSE 0 END) FROM IMG_OBJ

Database: disney
Question: How many PG adventure movies did Ron Clements direct?
Evidence: Ron Clements refers to director = 'Ron Clements'; PG is an abbreviation for parental guidance and refers to MPAA_rating = 'PG'; adventure movie refers to genre = 'Adventure';
SQL: SELECT COUNT(*) FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Ron Clements' AND T2.MPAA_rating = 'PG' AND T2.genre = 'Adventure'

Database: image_and_language
Question: How many images include the "wood" objects?
Evidence: images refer to IMG_ID; "wood" objects refer to OBJ_CLASS = 'wood';
SQL: SELECT COUNT(DISTINCT 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 = 'wood'

Database: regional_sales
Question: What is the store id of the store located in the most populous county?
Evidence: most populous country refers to Max(Population)
SQL: SELECT CASE WHEN MAX(Population) THEN StoreID END FROM `Store Locations`

Database: authors
Question: Enumerate the paper and author ID of authors with affiliation with Cairo Microsoft Innovation Lab.
Evidence: "Cairo Microsoft Innovation Lab" is the Affiliation organization
SQL: SELECT PaperId, AuthorId FROM PaperAuthor WHERE Affiliation LIKE 'Cairo Microsoft Innovation Lab%'

Database: public_review_platform
Question: How many likes did short comment left by users who joined in 2010 get?
Evidence: short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010;
SQL: SELECT SUM(T2.likes) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2010

Database: movies_4
Question: How many crew are named John Young?
SQL: SELECT COUNT(person_id) FROM person WHERE person_name = 'John Young'

Database: university
Question: In 2011, which university got the lowest score in teaching criteria?
Evidence: in 2011 refers to year 2011; got the lowest score refers to MIN(score), teaching criteria refers to criteria_name = 'Teaching'
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 ORDER BY T2.score ASC LIMIT 1