Chinastark/bird_dataset huggingface dataset:
Database: app_store
Note: percentage = DIVIDE(SUBTRACT(SUM(sentiment = 'Positive')), (SUM(sentiment = 'Negative')), SUM(sentiment = 'Negative')) as percentage; having more positive sentiment than negative sentiment refers to sentiment = 'Positive'>sentiment = 'Negative';
Question: What is the percentage of application with 4.7 rating having more positives sentiment than negative sentiment?
SQL: SELECT cast(count(CASE WHEN ( SELECT count(CASE WHEN sentiment = 'Positive' THEN 1 ELSE NULL END) - count(CASE WHEN sentiment = 'Negative' THEN 1 ELSE NULL END) FROM user_reviews GROUP BY app ) > 0 THEN 1 ELSE NULL END) AS REAL) * 100 / count(user_reviews.sentiment) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.rating = 4.7
Database: app_store
Note: doest not have negative sentiment refers to sentiment! = 'Negative'; average = AVG(sentiment_polarity);
Question: List down app that does not have negative sentiment and give their average rating?
SQL: SELECT playstore.app, avg(user_reviews.sentiment_polarity) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.sentiment != 'Negative' GROUP BY playstore.app
Database: app_store
Note: percentage = DIVIDE(SUBTRACT(SUM(sentiment = 'Positive')), (SUM(sentiment = 'Negative'))), (SUM(sentiment = 'Negative')) as percent; Last Updated>'2015';
Question: List down application that have not been updated since 2015. What is the percentage of this application having more negative sentiment than positive sentiment?
SQL: SELECT cast((( SELECT count(*) po FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE substr(playstore."Last Updated", -4, 4) > '2015' AND user_reviews.sentiment = 'Positive' ) - ( SELECT count(*) ne FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE substr(playstore."Last Updated", -4, 4) > '2015' AND user_reviews.sentiment = 'Negative' )) AS REAL) * 100 / ( SELECT count(*) num FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE substr(playstore."Last Updated", -4, 4) > '2015' )
Database: app_store
Note: paid refers to type = 'Paid'; application refers to app; rating>4.5; Last Updated>'2018; percentage = DIVIDE(SUM(genres = 'Mature 17+' and rating>4.5 and substr("Last Updated",-4,4)>'2018' )), (COUNT(app)) as percent;
Question: What is the percentage for free application with a rating 4.5 and above have not been updated since 2018?
SQL: SELECT cast(sum(CASE WHEN substr('Last Updated', -4) > '2018' THEN 1 ELSE 0 END) AS REAL) * 100 / count(app) per FROM playstore WHERE TYPE = 'Free' AND rating >= 4.5
Database: app_store
Note: Honkai Impact 3rd is the app;
Question: What genre does Honkai Impact 3rd belong to?
SQL: SELECT DISTINCT genres FROM playstore WHERE app = 'Honkai Impact 3rd'
Database: app_store
Note: FALSE;
Question: List down the rating for the App Learn C++.
SQL: SELECT DISTINCT rating FROM playstore WHERE app = 'Learn C++'
Database: app_store
Note: average price = AVG(price);
Question: What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10+?
SQL: SELECT avg(price) FROM playstore WHERE 'Content Rating' = 'Everyone 10+' AND genres = 'Arcade'
Database: app_store
Note: Browser 4G is the app; pretty positive favorability refers to sentiment_polarity score = 0.5;
Question: How much is the size of Browser 4G and how many users have a pretty positive favorability on it?
SQL: SELECT playstore.size, count(playstore.app) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Browser 4G' AND user_reviews.sentiment_polarity >= 0.5
Database: app_store
Note: FALSE;
Question: Name the Apps with a sentiment objectivity of 0.3 and include their number of installs.
SQL: SELECT DISTINCT playstore.app, playstore.installs FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.sentiment_polarity = 0.3
Database: app_store
Note: average sentiment polarity score = AVG(sentiment_polarity); Golf GPS Rangefinder: Golf Pad  is the app;
Question: How much is the average sentiment polarity score of Golf GPS Rangefinder: Golf Pad and what is it's rating in the Google Play Store?
SQL: SELECT avg(user_reviews.sentiment_polarity), playstore.rating FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Golf GPS Rangefinder: Golf Pad'
Database: app_store
Note: lowest rating refers to MIN(rating); puzzle is the genre;
Question: List the top 5 lowest rated puzzle games and count the number of negative sentiments the games received.
SQL: SELECT playstore.app, count(playstore.app) countnumber FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.sentiment = 'Negative' GROUP BY playstore.app ORDER BY playstore.rating LIMIT 5
Database: app_store
Note: Fate/Grand Order is the app; percentage ratio = MULTIPLY(DIVIDE((SUM(sentiment = 'Positive')), (SUM(sentiment = 'Negative'))), 100);
Question: What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version.
SQL: SELECT cast(sum(CASE WHEN user_reviews.sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / sum(CASE WHEN user_reviews.sentiment = 'Negative' THEN 1 ELSE 0 END), playstore.`current ver` FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Fate/Grand Order (English)' AND playstore.`current ver` = '1.18.0'
Database: app_store
Note: FREEDOME VPN Unlimited anonymous Wifi Security is the app; percentage = MULTIPLY(DIVIDE((SUM(sentiment = 'Positive')), (COUNT(*))), 100);
Question: Indicate the number of installs and include the percentage of positive sentiments of FREEDOME VPN Unlimited anonymous Wifi Security.
SQL: SELECT playstore.installs , cast(sum(CASE WHEN user_reviews.sentiment = 'Positive' THEN 1 ELSE 0 END) * 100 / sum(CASE WHEN user_reviews.sentiment IS NOT NULL THEN 1.0 ELSE 0 END) AS REAL) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'FREEDOME VPN Unlimited anonymous Wifi Security'
Database: app_store
Note: highest sentiment polarity score refers to MAX(sentiment_polarity);
Question: For the Honkai Impact 3rd App, what is the highest sentiment polarity score and what genre does it belong to?
SQL: SELECT max(user_reviews.sentiment_polarity), playstore.genres FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Honkai Impact 3rd' AND user_reviews.sentiment_polarity > 0.5 GROUP BY playstore.genres
Database: app_store
Note: Dragon Ball Legends is the app; users who dislikes the app refers to sentiment_polarity<-0.5;
Question: What is the rating of Dragon Ball Legends and how many users dislike this App?
SQL: SELECT playstore.rating, count(user_reviews.sentiment_polarity) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Dragon Ball Legends' AND cast(sentiment_polarity AS INTEGER) < -0.5
Database: app_store
Note: education app refers to category = 'EDUCATION'; worst rated app refers to rating = 1;
Question: Which education App has the worst rating and state the translated review if available.
SQL: SELECT playstore.app, user_reviews.translated_review FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.category = 'EDUCATION' GROUP BY playstore.app, user_reviews.translated_review ORDER BY playstore.rating ASC LIMIT 1
Database: app_store
Note: paid sports apps refers to type = 'Paid' and category = 'SPORTS';
Question: List all free sports Apps and their translated review.
SQL: SELECT playstore.app, user_reviews.translated_review FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.type = 'Free' AND playstore.category = 'SPORTS'
Database: app_store
Note: targeted to teen refers to content rating = 'Teen'; average = AVG(sentiment_polarity);
Question: Among the role playing game genre, how many are targeted to teens and what is their average sentiment polarity score?
SQL: SELECT count(playstore.app), avg(user_reviews.sentiment_polarity) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore."Content Rating" = 'Teen' AND playstore.genres = 'Role Playing'
Database: app_store
Note: average rating = AVG(rating); percentage = MULTIPLY(DIVIDE((SUM(sentiment = 'Positive')), (COUNT(*)), 100));
Question: What is the average rating of Apps falling under the racing genre and what is the percentage ratio of positive sentiment reviews?
SQL: SELECT avg(playstore.rating), cast(count(CASE WHEN user_reviews.sentiment = 'Positive' THEN 1 ELSE NULL END) AS REAL) * 100 / count(user_reviews.sentiment) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.genres = 'Racing'
Database: regional_sales
Note: the most number of sales team refers to MAX(COUNT(sales team));
Question: Which region has the most number of sales team?
SQL: SELECT region FROM `sales team` GROUP BY region ORDER BY count(DISTINCT `sales team`) DESC LIMIT 1
Database: regional_sales
Note: name containing the word 'Group' refers to customer names LIKE '%Group%';
Question: List all the customers with name containing the word 'Group'.
SQL: SELECT t FROM ( SELECT iif(`customer names` LIKE '%Group%', `customer names`, NULL) AS t FROM customers ) WHERE t IS NOT NULL
Database: regional_sales
Note: AVG(median income) where type = 'City';
Question: What is the average median income for all City type of stores?
SQL: SELECT avg(`median income`) FROM `store locations` WHERE TYPE = 'City'
Database: regional_sales
Question: Name the sales team and the region of order number 'SO - 000137'.
SQL: SELECT sales team.`sales team`, sales team.region FROM `sales orders` INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales orders.ordernumber = 'SO - 000137'
Database: regional_sales
Question: List all the order numbers along with its product name for each order under the sales team of 'Douglas Tucker'.
SQL: SELECT DISTINCT products.productid, products.`product name` FROM products INNER JOIN `sales orders` ON sales orders._productid = products.productid INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales team.`sales team` = 'Douglas Tucker'
Database: regional_sales
Note: MAX(discount applied) where product name = 'Cocktail Glasses'; orders in 2020 refer to the orderdate between 01-01-2020 and 31-12-2020;
Question: Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'
SQL: SELECT DISTINCT customers.`customer names` FROM customers INNER JOIN `sales orders` ON sales orders._customerid = customers.customerid INNER JOIN products ON products.productid = sales orders._productid WHERE products.`product name` = 'Cocktail Glasses' AND substr(sales orders.orderdate, -2) = '20' AND sales orders.`discount applied` = ( SELECT sales orders.`discount applied` FROM customers INNER JOIN `sales orders` ON sales orders._customerid = customers.customerid INNER JOIN products ON products.productid = sales orders._productid WHERE products.`product name` = 'Cocktail Glasses' AND sales orders.orderdate LIKE '%/%/20' ORDER BY sales orders.`discount applied` DESC LIMIT 1 )
Database: regional_sales
Note: In-Store sales refer to sales channel = 'In-Store'; city refers to city name;
Question: List all the order numbers for In-Store sales and find the city where the store is located.
SQL: SELECT DISTINCT sales orders.ordernumber, store locations.`city name` FROM `sales orders` INNER JOIN `store locations` ON store locations.storeid = sales orders._storeid WHERE sales orders.`sales channel` = 'In-Store'
Database: regional_sales
Note: the most expensive refers to MAX(unit cost); who refers to customer names; when refers to orderdate;
Question: Name the most expensive ordered? Who, when was it ordered?
SQL: SELECT sales orders.ordernumber, customers.`customer names`, sales orders.orderdate FROM customers INNER JOIN `sales orders` ON sales orders._customerid = customers.customerid INNER JOIN products ON products.productid = sales orders._productid ORDER BY sales orders.`unit cost` DESC LIMIT 1
Database: regional_sales
Note: Rochester Ltd is the name of the customer; all the numbers ordered refer to ordernumber; 2018 refers to SUBSTR(orderdate, -2) = '18';
Question: List all the numbers ordered by 'Rochester Ltd' in 2018.
SQL: SELECT DISTINCT t FROM ( SELECT CASE  WHEN sales orders.orderdate LIKE '%/%/18' AND customers.`customer names` = 'Rochester Ltd' THEN sales orders.ordernumber ELSE NULL END AS t FROM `sales orders` sales orders INNER JOIN customers customers ON customers.customerid = sales orders._customerid ) WHERE t IS NOT NULL
Database: regional_sales
Note: all the orders from WARE-NMK1003 refer to ordernumber where warehousecode = 'WARE-NMK1003'; product refers to product name;
Question: Provide all the orders from WARE-NMK1003. Name the product and sales team for each of these order.
SQL: SELECT DISTINCT products.`product name`, sales team.`sales team` FROM products INNER JOIN `sales orders` ON sales orders._productid = products.productid INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales orders.warehousecode = 'WARE-NMK1003'
Database: regional_sales
Note: orders online refer to sales channel = 'Online';
Question: List the name of all customers who had made orders online.
SQL: SELECT t FROM ( SELECT CASE  WHEN sales orders.`sales channel` = 'Online' THEN customers.`customer names` ELSE NULL END AS t FROM customers customers INNER JOIN `sales orders` sales orders ON sales orders._customerid = customers.customerid ) WHERE t IS NOT NULL
Database: regional_sales
Note: net profit can be computed as SUBTRACT(unit price, unit cost); AVG(net profit) where product name = 'Bakeware';
Question: Calculate the average net profit for bakeware product.
SQL: SELECT avg(replace(sales orders.`unit price`, ',', '') - replace(sales orders.`unit cost`, ',', ''))  FROM `sales orders` INNER JOIN products ON products.productid = sales orders._productid WHERE products.`product name` = 'Bakeware'
Database: regional_sales
Note: 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';
Question: Name the sales team name who had orders with the greatest net profit in 2020.
SQL: SELECT sales team.`sales team` FROM `sales orders` INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales orders.orderdate LIKE '%/%/20' GROUP BY sales team.`sales team` ORDER BY sum(replace(sales orders.`unit price`, ',', '') - replace(sales orders.`unit cost`, ',', '')) DESC LIMIT 1
Database: regional_sales
Note: net profit can be computed as SUBTRACT(unit price, unit cost); Joshua Bennett is the name of sales team;
Question: Sate the order number and calculate the net profit for each order under Joshua Bennett.
SQL: SELECT sales orders.ordernumber , replace(sales orders.`unit price`, ',', '') - replace(sales orders.`unit cost`, ',', '')  FROM `sales orders` INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales team.`sales team` = 'Joshua Bennett'
Database: regional_sales
Note: shipped in July 2018 refers to shipdate between 01-07-2018 and 31-07-2018; DIVIDE(COUNT(ordernumber where product name = 'Home Fragrances' and SUBSTR(orderdate, 1, 1) = '7'), COUNT(ordernumber where SUBSTR(shipdate, -2) = '18')) as percentage;
Question: Among the sales order shipped in July 2018, calculate the percentage of orders for home fragrances.
SQL: SELECT sum(CASE WHEN products.`product name` = 'Home Fragrances' THEN 1 ELSE 0 END) * 100 / count(sales orders.ordernumber)  FROM `sales orders` INNER JOIN products ON products.productid = sales orders._productid WHERE sales orders.shipdate LIKE '7/%/18'
Database: regional_sales
Note: names that start with alphabet "W" refer to customer names LIKE 'W%';
Question: List down the customer IDs and names that start with alphabet "W".
SQL: SELECT DISTINCT customerid, `customer names` FROM customers WHERE `customer names` LIKE 'W%' ORDER BY `customer names` DESC
Database: regional_sales
Note: names that include the word "Outdoor" refer to product name LIKE '%Outdoor%';
Question: List down the product IDs and names that include the word "Outdoor".
SQL: SELECT productid, t FROM ( SELECT productid , CASE  WHEN `product name` LIKE '%Outdoor%' THEN `product name` ELSE NULL END AS t FROM products ) WHERE t IS NOT NULL ORDER BY t DESC
Database: regional_sales
Note: 40% discount refers to discount applied = 0.4; in-store channel refers to sales channel = 'In-Store'; orders refer to ordernumber;
Question: Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?
SQL: SELECT count(DISTINCT t) FROM ( SELECT CASE  WHEN `sales channel` = 'In-Store' AND warehousecode = 'WARE-NMK1003' AND `discount applied` = '0.4' THEN ordernumber ELSE NULL END AS t FROM `sales orders` ) WHERE t IS NOT NULL
Database: regional_sales
Note: most populated refers to Max(population);
Question: Mention the most populated city and median income of the store in Florida state.
SQL: SELECT `city name`, `median income` FROM `store locations` WHERE state = 'Florida' ORDER BY population DESC LIMIT 1
Database: regional_sales
Note: ID refers to storeid;
Question: Describe the ID, city and region of the stores which are in Allen country.
SQL: SELECT DISTINCT store locations.storeid, store locations.`city name`, regions.region FROM regions INNER JOIN `store locations` ON store locations.statecode = regions.statecode WHERE store locations.county = 'Allen County'
Database: regional_sales
Note: COUNT(storeid) < COUNT(storeid where type = 'Borough') < COUNT(storeid where type = 'CDP');
Question: List the ID, city, state and region for the store type which is fewer between borough and CDP.
SQL: SELECT DISTINCT store locations.storeid, store locations.`city name`, regions.state, store locations.type FROM regions INNER JOIN `store locations` ON store locations.statecode = regions.statecode WHERE store locations.type = 'Borough' OR store locations.type = 'CDP'
Database: regional_sales
Note: sale team ID of 18 refers to _salesteamid = 18; COUNT(ordernumber where sales channel = 'In-Store') > COUNT(ordernumber where sales channel = 'Online');
Question: Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.
SQL: SELECT sales team.region, sales team.`sales team` FROM `sales orders` INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales team.salesteamid = 18 AND sales orders.`sales channel` = 'In-Store' OR sales orders.`sales channel` = 'Online'
Database: regional_sales
Note: Medline is the name of the customer; DIVIDE(COUNT(ordernumber where sales channel = 'In-Store' and customer names = 'Medline'), COUNT(ordernumber where customer names = 'Medline')) as percentage;
Question: Calculate the percentage of order via in-store channel of customer "Medline".
SQL: SELECT cast(sum(CASE WHEN sales orders.`sales channel` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / count(sales orders._customerid) FROM `sales orders` INNER JOIN customers ON customers.customerid = sales orders._customerid WHERE customers.`customer names` = 'Medline '
Database: regional_sales
Note: delivery period in 2019 means time between placing of an order and the receipt of product and refers to SUBTRACT(deliverydate, orderdate) where SUBSTR(orderdate, -2 ) = '19'; sales channel = 'Wholesale'; product name = 'Bedroom Furniture';
Question: Describe the customer names and lasting delivery periods for the product of "Bedroom Furniture" by wholesale channel in 2019.
SQL: SELECT customers.`customer names`, sales orders.deliverydate FROM customers INNER JOIN `sales orders` ON sales orders._customerid = customers.customerid INNER JOIN products ON products.productid = sales orders._productid WHERE sales orders.`sales channel` = 'Wholesale' AND products.`product name` = 'Bedroom Furniture' AND sales orders.orderdate LIKE '%/%/19'
Database: regional_sales
Note: over 3800 USD in net profit refers to SUBTRACT(unit price, unit cost) where Net Profit > 3800;
Question: Describe the customer names and product names which had over 3800 USD in net profit.
SQL: SELECT DISTINCT `customer names`, `product name` FROM ( SELECT customers.`customer names`, products.`product name` , replace(sales orders.`unit price`, ',', '') - replace(sales orders.`unit cost`, ',', '') AS t FROM customers customers INNER JOIN `sales orders` sales orders ON sales orders._customerid = customers.customerid INNER JOIN products products ON products.productid = sales orders._productid ) WHERE t > 3800
Database: regional_sales
Note: cities refer to city name; no water area refers to water area = 0;
Question: List the store located cities with regions in no water area of California state.
SQL: SELECT DISTINCT store locations.`city name` FROM regions INNER JOIN `store locations` ON store locations.statecode = regions.statecode WHERE store locations.state = 'California' AND store locations.`water area` = '0'
Database: regional_sales
Note: DIVIDE(COUNT(ordernumber where sales team = 'Carlos Miller'), COUNT(ordernumber)) as percentage;
Question: Calculate the order percentage by "Carlos Miller" sales team.
SQL: SELECT cast(sum(CASE WHEN sales team.`sales team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / count(sales orders.ordernumber) FROM `sales orders` INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid
Database: regional_sales
Note: COUNT(ordernumber where product name = 'Platters') > COUNT(ordernumber where product name = 'Serveware');
Question: Compare the number of orders between "Platters" and "Serveware" products.
SQL: SELECT sum(CASE WHEN products.`product name` = 'Platters' THEN 1 ELSE 0 END) AS num1 , sum(CASE WHEN products.`product name` = 'Serveware' THEN 1 ELSE 0 END) AS num2 FROM `sales orders` INNER JOIN products ON products.productid = sales orders._productid
Database: regional_sales
Note: net profit can be computed as SUBTRACT(unit price, unit cost); highest median income city refers to city name where MAX(median income);
Question: Calculate the total net profit of the store located in highest median income city.
SQL: SELECT sum(replace(sales orders.`unit price`, ',', '') - replace(sales orders.`unit cost`, ',', '')) FROM `sales orders` INNER JOIN `store locations` ON store locations.storeid = sales orders._storeid ORDER BY store locations.`median income` DESC LIMIT 1
Database: regional_sales
Note: sales team ID of one digit refers to _salesteamid BETWEEN 1 AND 9; numbers of orders refer to COUNT(ordernumber);
Question: Among the sales team in South region, write down the numbers of orders made by the sales team ID of one digit.
SQL: SELECT count(sales orders.ordernumber) FROM `sales orders` INNER JOIN `sales team` ON sales team.salesteamid = sales orders._salesteamid WHERE sales team.region = 'South' AND sales team.salesteamid BETWEEN 1 AND 9 GROUP BY sales team.salesteamid HAVING count(sales orders.ordernumber)
Database: regional_sales
Note: orders refer to ordernumber;
Question: How many orders have order date in 5/31/2018?
SQL: SELECT sum(iif(orderdate = '5/31/18', 1, 0)) FROM `sales orders`
Database: regional_sales
Question: List out the name of orders which have delivery date of 6/13/2018.
SQL: SELECT DISTINCT t FROM ( SELECT iif(deliverydate = '6/13/18', ordernumber, NULL) AS t FROM `sales orders` ) WHERE t IS NOT NULL
Database: regional_sales
Note: orders refer to ordernumber; more than 5 product quantities refer to order quantity > 5;
Question: How many orders placed were with more than 5 product quantities?
SQL: SELECT sum(iif(`order quantity` > 5, 1, 0)) FROM `sales orders`
Database: regional_sales
Question: State the full name of state code "GA".
SQL: SELECT t FROM ( SELECT iif(statecode = 'GA', state, NULL) AS t FROM regions ) WHERE t IS NOT NULL