problem
stringlengths 121
422
| db_id
stringclasses 69
values | solution
stringlengths 23
804
|
---|---|---|
Write SQL query to solve given problem: Which negatively correlated, genetically interacting genes are non-essential? What percentage do they represent with respect to those that are essential?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | genes | SELECT CAST(COUNT(T1.GeneID) AS REAL) * 100 / ( SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr < 0 ) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr < 0 AND T1.Essential = 'Non-Essential' |
Write SQL query to solve given problem: How many apps were last updated in January of 2018? Please write one translated review with positive sentiment for each app, if there's any.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT Translated_Review FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE `Last Updated` BETWEEN 'January 1, 2018' AND 'January 31, 2018' ) AND Sentiment = 'Positive' |
Write SQL query to solve given problem: How many users mildly likes the 7 Minute Workout app and when was it last updated?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T2.Sentiment_Polarity), T1."Last Updated" FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '7 Minute Workout' AND T2.Sentiment_Polarity BETWEEN 0 AND 0.5 |
Write SQL query to solve given problem: How many users holds neutral attitude towards the HTC Weather app? Indicate the app's rating on the Google Play Store.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T1.Rating), T1.Rating FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'HTC Weather' AND T2.Sentiment = 'Neutral' |
Write SQL query to solve given problem: What is the name and category of the app with the highest amount of -1 sentiment polarity score?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT T1.App, T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = '-1.0' |
Write SQL query to solve given problem: What is the average sentiment polarity score of the Cooking Fever app? Indicate the age group that the app is targeted at.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(T2.Sentiment_Polarity), T1."Content Rating" FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Cooking Fever' |
Write SQL query to solve given problem: What is the lowest sentiment polarity score of the Basketball Stars app for people who dislikes the app pretty much and how many downloads does it have?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT MIN(T2.Sentiment_Polarity), T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Basketball Stars' |
Write SQL query to solve given problem: For the Akinator app, how many reviews have sentiment subjectivity of no more than 0.5 and what is its current version?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T2.Sentiment_Subjectivity), T1."Current Ver" FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Akinator' AND T2.Sentiment_Subjectivity < 0.5 |
Write SQL query to solve given problem: How many apps have rating of 5?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(App) FROM playstore WHERE Rating = 5 |
Write SQL query to solve given problem: What are the top 5 installed free apps?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT App FROM playstore WHERE Price = 0 ORDER BY CAST(REPLACE(REPLACE(Installs, ',', ''), '+', '') AS INTEGER) DESC LIMIT 5 |
Write SQL query to solve given problem: Name the top 10 most reviewed apps.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT App FROM playstore ORDER BY Reviews DESC LIMIT 10 |
Write SQL query to solve given problem: How many of the users hold neutral attitude on "10 Best Foods for You" app and what category is this app?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T2.App), T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '10 Best Foods for You' AND T2.Sentiment = 'Neutral' |
Write SQL query to solve given problem: What are the apps that users pretty like this app and how many installs amount of these apps?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity > 0 |
Write SQL query to solve given problem: List apps whose rating is 3.9 and state the translated review of each app.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Rating = 3.9 |
Write SQL query to solve given problem: How many apps that are only compatible with Android ver 8.0 and above? List down the users' sentiment of these apps.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT Sentiment FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE `Android Ver` = '8.0 and up' ) |
Write SQL query to solve given problem: Which apps have multiple genres and what is the total sentiment subjectivity of these apps?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT SUM(T2.Sentiment_Subjectivity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres > 1 |
Write SQL query to solve given problem: Which apps have not been updated since year 2015 and what kind of sentiment users hold on it?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT App, Sentiment FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE CAST(SUBSTR('Last Updated', -4, 4) AS INTEGER) < 2015 ) |
Write SQL query to solve given problem: What is the total installs of apps with content rating of adults only 18+ and what are the translated reviews of it?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT SUM(T1.Installs), T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1."Content Rating" = 'Adults only 18+' |
Write SQL query to solve given problem: Which of the app is the best selling app and what is the sentiments polarity of it?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App, T2.Sentiment_Polarity FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App ORDER BY T1.Price * CAST(REPLACE(REPLACE(Installs, ',', ''), '+', '') AS INTEGER) DESC LIMIT 1 |
Write SQL query to solve given problem: What is the average rating of comic category apps? How many users hold positive attitude towards this app?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(T1.Rating) , COUNT(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE NULL END) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'COMICS' |
Write SQL query to solve given problem: What is the rating for "Draw A Stickman"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT Rating FROM playstore WHERE APP = 'Draw A Stickman' |
Write SQL query to solve given problem: How many of the reviews for the app "Brit + Co" have a comment?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(App) FROM user_reviews WHERE App = 'Brit + Co' AND Translated_Review IS NOT NULL |
Write SQL query to solve given problem: List the top 5 shopping apps with the most reviews.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT App FROM playstore WHERE Genres = 'Shopping' GROUP BY App ORDER BY COUNT(App) DESC LIMIT 5 |
Write SQL query to solve given problem: How many neutral reviews does the app "Dino War: Rise of Beasts" have?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(App) FROM user_reviews WHERE App = 'Dino War: Rise of Beasts' AND Sentiment = 'Neutral' |
Write SQL query to solve given problem: What are the apps with only 5,000+ installs?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT App FROM playstore WHERE Installs = '5,000+' |
Write SQL query to solve given problem: List all the negative comments on the "Dog Run - Pet Dog Simulator" app.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT Translated_Review FROM user_reviews WHERE App = 'Dog Run - Pet Dog Simulator' AND Sentiment = 'Negative' |
Write SQL query to solve given problem: Which free app has the most Negative comments?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Type = 'Free' AND T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY COUNT(T2.Sentiment) DESC LIMIT 1 |
Write SQL query to solve given problem: How many negative comments are there in all the apps with 100,000,000+ installs?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Installs = '100,000,000+' AND T2.Sentiment = 'Negative' |
Write SQL query to solve given problem: What are the content ratings for the apps that have "gr8" in their comments?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT T1.`Content Rating` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review LIKE '%gr8%' |
Write SQL query to solve given problem: What is the total Sentiment polarity score of the most expensive app?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT SUM(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Price = ( SELECT MAX(Price) FROM playstore ) |
Write SQL query to solve given problem: What is the rating for "Garden Coloring Book"? List all of its reviews.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.Rating, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Garden Coloring Book' |
Write SQL query to solve given problem: Which Photography app has the highest total Sentiment subjectivity score?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres = 'Photography' GROUP BY T1.App ORDER BY SUM(T2.Sentiment_Subjectivity) DESC LIMIT 1 |
Write SQL query to solve given problem: List all the comments on the lowest rated Mature 17+ app.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1."Content Rating" = 'Mature 17+' ORDER BY T1.Rating LIMIT 1 |
Write SQL query to solve given problem: What is the number of installments of the app with the highest total Sentiment polarity score?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App GROUP BY T1.App ORDER BY SUM(T2.Sentiment_Polarity) DESC LIMIT 1 |
Write SQL query to solve given problem: What is the number of neutral comments from all the weather apps?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres = 'Weather' AND T2.Sentiment = 'Neutral' |
Write SQL query to solve given problem: Which 1,000,000,000+ intalls apps has the most no comment reviews?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Installs = '1,000,000+' AND T2.Translated_Review = 'nan' GROUP BY T1.App ORDER BY COUNT(T2.Translated_Review) DESC LIMIT 1 |
Write SQL query to solve given problem: What is the rating and the total Sentiment subjectivity score of "Onefootball - Soccer Scores"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.Rating, SUM(T2.Sentiment_Subjectivity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Onefootball - Soccer Scores' |
Write SQL query to solve given problem: What percentage of no comment reviews are from "Teen" content rating apps?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT CAST(COUNT(CASE WHEN T1.`Content Rating` = 'Teen' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review = 'nan' |
Write SQL query to solve given problem: Which apps have 5 rating? List out then application name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT App FROM playstore WHERE Rating = 5 |
Write SQL query to solve given problem: Which apps have been reviewed more than 75 000 000 times and the content is suitable for teenagers?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT App FROM playstore WHERE Reviews > 75000000 AND `Content Rating` = 'Teen' |
Write SQL query to solve given problem: List out genre that have downloads more than 1000000000.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT Genres FROM playstore WHERE Installs = '1,000,000,000+' GROUP BY Genres |
Write SQL query to solve given problem: What is the average price for a dating application?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(Price) FROM playstore WHERE Genres = 'Dating' |
Write SQL query to solve given problem: What is the average download for entertainment apps with size no more than 1.0 M?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(CAST(REPLACE(REPLACE(Installs, ',', ''), '+', '') AS INTEGER)) FROM playstore WHERE Category = 'ENTERTAINMENT' AND Size < '1.0M' |
Write SQL query to solve given problem: What is the average review number for application with 5 rating?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(Reviews) FROM playstore WHERE Rating = 5 |
Write SQL query to solve given problem: List out the top 3 genre for application with a sentiment review greater than 0.5.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT Genres FROM playstore WHERE App IN ( SELECT App FROM user_reviews WHERE Sentiment = 'Positive' AND Sentiment_Polarity > 0.5 ORDER BY Sentiment_Polarity DESC LIMIT 3 ) |
Write SQL query to solve given problem: What is the percentage of application with 4.7 rating having more positives sentiment than negative sentiment?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | 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(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Rating = 4.7 |
Write SQL query to solve given problem: List down app that does not have negative sentiment and give their average rating?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App, AVG(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment != 'Negative' GROUP BY T1.App |
Write SQL query to solve given problem: List down application that have not been updated since 2015. What is the percentage of this application having more negative sentiment than positive sentiment?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT CAST((( SELECT COUNT(*) Po FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Positive' ) - ( SELECT COUNT(*) Ne FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Negative' )) AS REAL) * 100 / ( SELECT COUNT(*) NUM FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' ) |
Write SQL query to solve given problem: What is the percentage for free application with a rating 4.5 and above have not been updated since 2018?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | 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 |
Write SQL query to solve given problem: What genre does Honkai Impact 3rd belong to?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT Genres FROM playstore WHERE App = 'Honkai Impact 3rd' |
Write SQL query to solve given problem: List down the rating for the App Learn C++.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT Rating FROM playstore WHERE App = 'Learn C++' |
Write SQL query to solve given problem: What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10+?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(Price) FROM playstore WHERE 'Content Rating' = 'Everyone 10+' AND Genres = 'Arcade' |
Write SQL query to solve given problem: How much is the size of Browser 4G and how many users have a pretty positive favorability on it?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.Size, COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Browser 4G' AND T2.Sentiment_Polarity >= 0.5 |
Write SQL query to solve given problem: Name the Apps with a sentiment objectivity of 0.3 and include their number of installs.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = 0.3 |
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(T2.Sentiment_Polarity), T1.Rating FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Golf GPS Rangefinder: Golf Pad' |
Write SQL query to solve given problem: List the top 5 lowest rated puzzle games and count the number of negative sentiments the games received.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App, COUNT(T1.App) COUNTNUMBER FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY T1.Rating LIMIT 5 |
Write SQL query to solve given problem: What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Sentiment = 'Negative' THEN 1 ELSE 0 END), T1.`Current Ver` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Fate/Grand Order (English)' AND T1.`Current Ver` = '1.18.0' |
Write SQL query to solve given problem: Indicate the number of installs and include the percentage of positive sentiments of FREEDOME VPN Unlimited anonymous Wifi Security.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.Installs , CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN T2.Sentiment IS NOT NULL THEN 1.0 ELSE 0 END) AS REAL) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'FREEDOME VPN Unlimited anonymous Wifi Security' |
Write SQL query to solve given problem: For the Honkai Impact 3rd App, what is the highest sentiment polarity score and what genre does it belong to?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT MAX(T2.Sentiment_Polarity), T1.Genres FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Honkai Impact 3rd' AND T2.Sentiment_Polarity > 0.5 GROUP BY T1.Genres |
Write SQL query to solve given problem: What is the rating of Dragon Ball Legends and how many users dislike this App?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.Rating, COUNT(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Dragon Ball Legends' AND CAST(Sentiment_Polarity AS INTEGER) < -0.5 |
Write SQL query to solve given problem: Which education App has the worst rating and state the translated review if available.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'EDUCATION' GROUP BY T1.App, T2.Translated_Review ORDER BY T1.Rating ASC LIMIT 1 |
Write SQL query to solve given problem: List all free sports Apps and their translated review.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Type = 'Free' AND T1.Category = 'SPORTS' |
Write SQL query to solve given problem: Among the role playing game genre, how many are targeted to teens and what is their average sentiment polarity score?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT COUNT(T1.App), AVG(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1."Content Rating" = 'Teen' AND T1.Genres = 'Role Playing' |
Write SQL query to solve given problem: What is the average rating of Apps falling under the racing genre and what is the percentage ratio of positive sentiment reviews?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | app_store | SELECT AVG(T1.Rating), CAST(COUNT(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres = 'Racing' |
Write SQL query to solve given problem: Which region has the most number of sales team?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT Region FROM `Sales Team` GROUP BY Region ORDER BY COUNT(DISTINCT `Sales Team`) DESC LIMIT 1 |
Write SQL query to solve given problem: Name the sales team and the region of order number 'SO - 000137'.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T2.`Sales Team`, T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderNumber = 'SO - 000137' |
Write SQL query to solve given problem: Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT DISTINCT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND SUBSTR(T2.OrderDate, -2) = '20' AND T2.`Discount Applied` = ( SELECT T2.`Discount Applied` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Discount Applied` DESC LIMIT 1 ) |
Write SQL query to solve given problem: Name the most expensive ordered? Who, when was it ordered?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T2.OrderNumber, T1.`Customer Names`, T2.OrderDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID ORDER BY T2.`Unit Cost` DESC LIMIT 1 |
Write SQL query to solve given problem: List all the numbers ordered by 'Rochester Ltd' in 2018.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT DISTINCT T FROM ( SELECT CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Customer Names` = 'Rochester Ltd' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: Name the sales team name who had orders with the greatest net profit in 2020.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | 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 |
Write SQL query to solve given problem: Among the sales order shipped in July 2018, calculate the percentage of orders for home fragrances.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN T2.`Product Name` = 'Home Fragrances' THEN 1 ELSE 0 END) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ShipDate LIKE '7/%/18' |
Write SQL query to solve given problem: Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | 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 |
Write SQL query to solve given problem: Mention the most populated city and median income of the store in Florida state.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1 |
Write SQL query to solve given problem: Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T2.Region, T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.SalesTeamID = 18 AND T1.`Sales Channel` = 'In-Store' OR T1.`Sales Channel` = 'Online' |
Write SQL query to solve given problem: Calculate the percentage of order via in-store channel of customer "Medline".. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1._CustomerID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Medline ' |
Write SQL query to solve given problem: Describe the customer names and lasting delivery periods for the product of "Bedroom Furniture" by wholesale channel in 2019.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T1.`Customer Names`, T2.DeliveryDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T2.`Sales Channel` = 'Wholesale' AND T3.`Product Name` = 'Bedroom Furniture' AND T2.OrderDate LIKE '%/%/19' |
Write SQL query to solve given problem: Describe the customer names and product names which had over 3800 USD in net profit.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT DISTINCT `Customer Names`, `Product Name` FROM ( SELECT T1.`Customer Names`, T3.`Product Name` , REPLACE(T2.`Unit Price`, ',', '') - REPLACE(T2.`Unit Cost`, ',', '') AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products T3 ON T3.ProductID = T2._ProductID ) WHERE T > 3800 |
Write SQL query to solve given problem: List the store located cities with regions in no water area of California state.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT DISTINCT T2.`City Name` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'California' AND T2.`Water Area` = '0' |
Write SQL query to solve given problem: Calculate the order percentage by "Carlos Miller" sales team.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT CAST(SUM(CASE WHEN T2.`Sales Team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID |
Write SQL query to solve given problem: Compare the number of orders between "Platters" and "Serveware" products.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN T2.`Product Name` = 'Platters' THEN 1 ELSE 0 END) AS num1 , SUM(CASE WHEN T2.`Product Name` = 'Serveware' THEN 1 ELSE 0 END) AS num2 FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID |
Write SQL query to solve given problem: Calculate the total net profit of the store located in highest median income city.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 1 |
Write SQL query to solve given problem: Among the sales team in South region, write down the numbers of orders made by the sales team ID of one digit.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'South' AND T2.SalesTeamID BETWEEN 1 AND 9 GROUP BY T2.SalesTeamID HAVING COUNT(T1.OrderNumber) |
Write SQL query to solve given problem: How many orders have order date in 5/31/2018?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(IIF(OrderDate = '5/31/18', 1, 0)) FROM `Sales Orders` |
Write SQL query to solve given problem: List out the name of orders which have delivery date of 6/13/2018.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT DISTINCT T FROM ( SELECT IIF(DeliveryDate = '6/13/18', OrderNumber, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: How many orders placed were with more than 5 product quantities?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(IIF(`Order Quantity` > 5, 1, 0)) FROM `Sales Orders` |
Write SQL query to solve given problem: List out the product name of order which has unit cost of 781.22.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T FROM ( SELECT DISTINCT IIF(T1.`Unit Cost` = 781.22, T2.`Product Name`, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: How many furniture cushions orders which have date of order in 2018?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Product Name` = 'Furniture Cushions' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID |
Write SQL query to solve given problem: List out the name of products which have been applied 10% discount.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T FROM ( SELECT DISTINCT IIF(T1.`Discount Applied` = 0.1, T2.`Product Name`, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: Calculate the average net profit of bar tools which has ordered quantity exceed 5.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bar Tools' AND T1.`Order Quantity` > 5 |
Write SQL query to solve given problem: How many orders that Medsep Group had made?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID |
Write SQL query to solve given problem: State the customer name of orders which has shipped date in 7/8/2018.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ShipDate = '7/8/18' THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: Among the orders placed by Ei, how many orders have quantity greater than 4?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN T1.`Order Quantity` > 4 AND T2.`Customer Names` = 'Ei ' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID |
Write SQL query to solve given problem: Among the orders placed by Pacific Ltd, how many orders have been applied 5% discount ?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN T1.`Discount Applied` = 0.05 AND T2.`Customer Names` = 'Pacific Ltd' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID |
Write SQL query to solve given problem: What is the customer names of orders which have unit cost greater than 4000USD?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` > 4000 THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: Which city has the largest population?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1 |
Write SQL query to solve given problem: How many CDP stores are there in California?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT SUM(CASE WHEN State = 'California' AND Type = 'CDP' THEN 1 ELSE 0 END) FROM `Store Locations` |
Write SQL query to solve given problem: Please give the order number and product name of the order which has the lowest unit price.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') LIMIT 1 ) |
Write SQL query to solve given problem: Which product has the highest net profit in 2019?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '%/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1 |
Write SQL query to solve given problem: Please list all sale team names which had orders on 5/31/2018.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL |
Write SQL query to solve given problem: Which sales team name has the least orders in 2019?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | regional_sales | SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) ASC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.