db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
genes | select cast(sum(iif(t1.chromosome > 10 and t3.chromosome > 10, 1, 0)) as real) * 100 / count(t1.geneid) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 inner join genes as t3 on t3.geneid = t2.geneid2 where t2.expression_corr > 0 | Question: if a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, Gen... | if a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes? |
genes | select avg(t2.expression_corr) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.class = 'atpases' | Question: for the pairs of genes both from the class atpases, what is the average expression correlation score? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | J... | for the pairs of genes both from the class atpases, what is the average expression correlation score? |
genes | select distinct geneid from genes where localization = 'cytoplasm' and function = 'metabolism' | Question: lists all genes by identifier number located in the cytoplasm and whose function is metabolism. | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: ... | lists all genes by identifier number located in the cytoplasm and whose function is metabolism. |
genes | select count(geneid) from classification where localization in ('plasma', 'nucleus') | Question: how many different genes do we have if we add those located in the plasma and in the nucleus? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: Ge... | how many different genes do we have if we add those located in the plasma and in the nucleus? |
genes | select expression_corr from interactions where type = 'physical' union all select cast(sum(expression_corr < 0) as real) * 100 / count(*) from interactions where type = 'physical' | Question: what kind of expression correlation occurs in physical type interacting gene pairs and what percentage of these are negatively correlated? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1... | what kind of expression correlation occurs in physical type interacting gene pairs and what percentage of these are negatively correlated? |
genes | select sum(localization = 'cytoskeleton' and phenotype = 'conditional phenotypes') , cast(sum(localization = 'cytoskeleton') as real) * 100 / count(geneid) from genes; | Question: what percentage of genes located in the cytoskeleton are of unknown class? and of these, how many are not conditional phenotypes? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2... | what percentage of genes located in the cytoskeleton are of unknown class? and of these, how many are not conditional phenotypes? |
genes | select t2.type from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.function = 'transcription' and t1.essential = 'non-essential' | Question: what type of interactions occurs in genes whose function is cellular transport and transport medicine and are classified as non-essential? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1... | what type of interactions occurs in genes whose function is cellular transport and transport medicine and are classified as non-essential? |
genes | select t1.geneid from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t2.expression_corr > 0 and t1.localization = 'nucleus' | Question: list all genes whose interaction is with genes located in the nucleus in which it is positively correlated. | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Cor... | list all genes whose interaction is with genes located in the nucleus in which it is positively correlated. |
genes | select t2.geneid1 from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.localization = 'nucleus' and t1.class = 'transcription factors' and t1.essential = 'essential' and t2.expression_corr != 0 | Question: taking all the essential genes of the transcription factors class located in the nucleus as a reference, how many of them carry out a genetic-type interaction with another gene? list them. | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosom... | taking all the essential genes of the transcription factors class located in the nucleus as a reference, how many of them carry out a genetic-type interaction with another gene? list them. |
genes | select count(t1.geneid) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t2.type != 'physical' and t1.phenotype = 'cell cycle defects' and t1.class != 'motorproteins' and t1.essential = 'non-essential' | Question: of all the nonessential genes that are not of the motorprotein class and whose phenotype is cell cycle defects, how many do not have a physical type of interaction? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localizatio... | of all the nonessential genes that are not of the motorprotein class and whose phenotype is cell cycle defects, how many do not have a physical type of interaction? |
genes | select cast(sum(iif(t2.expression_corr > 0, 1, 0)) as real) * 100 / count(t2.geneid1) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.phenotype = 'nucleic acid metabolism defects' and t1.motif = 'ps00107' | Question: of the genes whose phenotype and motif are nucleic acid metabolism defects, ps00107, what percentage perform positive interaction with another gene? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions ... | of the genes whose phenotype and motif are nucleic acid metabolism defects, ps00107, what percentage perform positive interaction with another gene? |
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' | Question: which negatively correlated, genetically interacting genes are non-essential? what percentage do they represent with respect to those that are essential? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interact... | which negatively correlated, genetically interacting genes are non-essential? what percentage do they represent with respect to those that are essential? |
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' | Question: 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. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_... | 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. |
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 | Question: how many users mildly likes the 7 minute workout app and when was it last updated? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.Ap... | how many users mildly likes the 7 minute workout app and when was it last updated? |
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' | Question: how many users holds neutral attitude towards the htc weather app? indicate the app's rating on the google play store. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Su... | how many users holds neutral attitude towards the htc weather app? indicate the app's rating on the google play store. |
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' | Question: what is the name and category of the app with the highest amount of -1 sentiment polarity score? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: u... | what is the name and category of the app with the highest amount of -1 sentiment polarity score? |
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' | Question: what is the average sentiment polarity score of the cooking fever app? indicate the age group that the app is targeted at. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentimen... | what is the average sentiment polarity score of the cooking fever app? indicate the age group that the app is targeted at. |
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' | Question: 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? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment... | 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? |
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 | Question: for the akinator app, how many reviews have sentiment subjectivity of no more than 0.5 and what is its current version? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_S... | for the akinator app, how many reviews have sentiment subjectivity of no more than 0.5 and what is its current version? |
app_store | select count(app) from playstore where rating = 5 | Question: how many apps have rating of 5? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | how many apps have rating of 5? |
app_store | select app from playstore where price = 0 order by cast(replace(replace(installs, ',', ''), '+', '') as integer) desc limit 5 | Question: what are the top 5 installed free apps? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | what are the top 5 installed free apps? |
app_store | select distinct app from playstore order by reviews desc limit 10 | Question: name the top 10 most reviewed apps. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | name the top 10 most reviewed apps. |
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' | Question: how many of the users hold neutral attitude on '10 best foods for you' app and what category is this app? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. |... | how many of the users hold neutral attitude on '10 best foods for you' app and what category is this app? |
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 | Question: what are the apps that users pretty like this app and how many installs amount of these apps? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user... | what are the apps that users pretty like this app and how many installs amount of these apps? |
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 | Question: list apps whose rating is 3.9 and state the translated review of each app. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = play... | list apps whose rating is 3.9 and state the translated review of each app. |
app_store | select distinct sentiment from user_reviews where app in ( select app from playstore where `android ver` = '8.0 and up' ) | Question: how many apps that are only compatible with android ver 8.0 and above? list down the users' sentiment of these apps. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subj... | how many apps that are only compatible with android ver 8.0 and above? list down the users' sentiment of these apps. |
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 | Question: which apps have multiple genres and what is the total sentiment subjectivity of these apps? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_r... | which apps have multiple genres and what is the total sentiment subjectivity of these apps? |
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 ) | Question: which apps have not been updated since year 2015 and what kind of sentiment users hold on it? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user... | which apps have not been updated since year 2015 and what kind of sentiment users hold on it? |
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+' | Question: what is the total installs of apps with content rating of adults only 18+ and what are the translated reviews of it? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subj... | what is the total installs of apps with content rating of adults only 18+ and what are the translated reviews of it? |
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 | Question: which of the app is the best selling app and what is the sentiments polarity of it? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.A... | which of the app is the best selling app and what is the sentiments polarity of it? |
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' | Question: what is the average rating of comic category apps? how many users hold positive attitude towards this app? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. ... | what is the average rating of comic category apps? how many users hold positive attitude towards this app? |
app_store | select rating from playstore where app = 'draw a stickman' | Question: what is the rating for 'draw a stickman'? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | what is the rating for 'draw a stickman'? |
app_store | select count(app) from user_reviews where app = 'brit + co' and translated_review is not null | Question: how many of the reviews for the app 'brit + co' have a comment? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | how many of the reviews for the app 'brit + co' have a comment? |
app_store | select distinct app from playstore where genres = 'shopping' group by app order by count(app) desc limit 5 | Question: list the top 5 shopping apps with the most reviews. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | list the top 5 shopping apps with the most reviews. |
app_store | select count(app) from user_reviews where app = 'dino war: rise of beasts' and sentiment = 'neutral' | Question: how many neutral reviews does the app 'dino war: rise of beasts' have? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstor... | how many neutral reviews does the app 'dino war: rise of beasts' have? |
app_store | select distinct app from playstore where installs = '5,000+' | Question: what are the apps with only 5,000+ installs? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | what are the apps with only 5,000+ installs? |
app_store | select translated_review from user_reviews where app = 'dog run - pet dog simulator' and sentiment = 'negative' | Question: list all the negative comments on the 'dog run - pet dog simulator' app. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playst... | list all the negative comments on the 'dog run - pet dog simulator' app. |
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 | Question: which free app has the most negative comments? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | which free app has the most negative comments? |
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' | Question: how many negative comments are there in all the apps with 100,000,000+ installs? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App ... | how many negative comments are there in all the apps with 100,000,000+ installs? |
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%' | Question: what are the content ratings for the apps that have 'gr8' in their comments? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = pl... | what are the content ratings for the apps that have 'gr8' in their comments? |
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 ) | Question: what is the total sentiment polarity score of the most expensive app? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore... | what is the total sentiment polarity score of the most expensive app? |
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' | Question: what is the rating for 'garden coloring book'? list all of its reviews. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playsto... | what is the rating for 'garden coloring book'? list all of its reviews. |
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 | Question: which photography app has the highest total sentiment subjectivity score? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = plays... | which photography app has the highest total sentiment subjectivity score? |
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 | Question: list all the comments on the lowest rated mature 17+ app. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | list all the comments on the lowest rated mature 17+ app. |
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 | Question: what is the number of installments of the app with the highest total sentiment polarity score? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: use... | what is the number of installments of the app with the highest total sentiment polarity score? |
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' | Question: what is the number of neutral comments from all the weather apps? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App... | what is the number of neutral comments from all the weather apps? |
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 | Question: which 1,000,000,000+ intalls apps has the most no comment reviews? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.Ap... | which 1,000,000,000+ intalls apps has the most no comment reviews? |
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' | Question: what is the rating and the total sentiment subjectivity score of 'onefootball - soccer scores'? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: us... | what is the rating and the total sentiment subjectivity score of 'onefootball - soccer scores'? |
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' | Question: what percentage of no comment reviews are from 'teen' content rating apps? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = play... | what percentage of no comment reviews are from 'teen' content rating apps? |
app_store | select distinct app from playstore where rating = 5 | Question: which apps have 5 rating? list out then application name. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | which apps have 5 rating? list out then application name. |
app_store | select distinct app from playstore where reviews > 75000000 and `content rating` = 'teen' | Question: which apps have been reviewed more than 75 000 000 times and the content is suitable for teenagers? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins... | which apps have been reviewed more than 75 000 000 times and the content is suitable for teenagers? |
app_store | select genres from playstore where installs = '1,000,000,000+' group by genres | Question: list out genre that have downloads more than 1000000000. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | list out genre that have downloads more than 1000000000. |
app_store | select avg(price) from playstore where genres = 'dating' | Question: what is the average price for a dating application? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | what is the average price for a dating application? |
app_store | select avg(cast(replace(replace(installs, ',', ''), '+', '') as integer)) from playstore where category = 'entertainment' and size < '1.0m' | Question: what is the average download for entertainment apps with size no more than 1.0 m? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App... | what is the average download for entertainment apps with size no more than 1.0 m? |
app_store | select avg(reviews) from playstore where rating = 5 | Question: what is the average review number for application with 5 rating? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | what is the average review number for application with 5 rating? |
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 ) | Question: list out the top 3 genre for application with a sentiment review greater than 0.5. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.Ap... | list out the top 3 genre for application with a sentiment review greater than 0.5. |
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 = ... | Question: what is the percentage of application with 4.7 rating having more positives sentiment than negative sentiment? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivi... | what is the percentage of application with 4.7 rating having more positives sentiment than negative sentiment? |
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 | Question: list down app that does not have negative sentiment and give their average rating? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.Ap... | list down app that does not have negative sentiment and give their average rating? |
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) > '2... | 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? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Se... | list down application that have not been updated since 2015. what is the percentage of this application having more negative sentiment than positive sentiment? |
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 | Question: what is the percentage for free application with a rating 4.5 and above have not been updated since 2018? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. |... | what is the percentage for free application with a rating 4.5 and above have not been updated since 2018? |
app_store | select distinct genres from playstore where app = 'honkai impact 3rd' | Question: what genre does honkai impact 3rd belong to? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | what genre does honkai impact 3rd belong to? |
app_store | select distinct rating from playstore where app = 'learn c++' | Question: list down the rating for the app learn c++. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | list down the rating for the app learn c++. |
app_store | select avg(price) from playstore where 'content rating' = 'everyone 10+' and genres = 'arcade' | Question: what is the average price of games belonging in the arcade genre which has a content rating of everyone 10+? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity... | what is the average price of games belonging in the arcade genre which has a content rating of everyone 10+? |
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 | Question: how much is the size of browser 4g and how many users have a pretty positive favorability on it? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: u... | how much is the size of browser 4g and how many users have a pretty positive favorability on it? |
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 | Question: name the apps with a sentiment objectivity of 0.3 and include their number of installs. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_revie... | name the apps with a sentiment objectivity of 0.3 and include their number of installs. |
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' | 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? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity... | 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? |
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 | Question: list the top 5 lowest rated puzzle games and count the number of negative sentiments the games received. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | ... | list the top 5 lowest rated puzzle games and count the number of negative sentiments the games received. |
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' | Question: what is the percentage ratio between positive sentiments and negative sentiments that are in fate/grand order? also indicate the current version. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Senti... | what is the percentage ratio between positive sentiments and negative sentiments that are in fate/grand order? also indicate the current version. |
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' | Question: indicate the number of installs and include the percentage of positive sentiments of freedome vpn unlimited anonymous wifi security. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity... | indicate the number of installs and include the percentage of positive sentiments of freedome vpn unlimited anonymous wifi security. |
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 | Question: for the honkai impact 3rd app, what is the highest sentiment polarity score and what genre does it belong to? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivit... | for the honkai impact 3rd app, what is the highest sentiment polarity score and what genre does it belong to? |
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 | Question: what is the rating of dragon ball legends and how many users dislike this app? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = ... | what is the rating of dragon ball legends and how many users dislike this app? |
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 | Question: which education app has the worst rating and state the translated review if available. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_review... | which education app has the worst rating and state the translated review if available. |
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' | Question: list all free sports apps and their translated review. | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Subjectivity. | Joins: user_reviews.App = playstore.App, | list all free sports apps and their translated review. |
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' | Question: among the role playing game genre, how many are targeted to teens and what is their average sentiment polarity score? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, Sentiment_Sub... | among the role playing game genre, how many are targeted to teens and what is their average sentiment polarity score? |
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' | Question: what is the average rating of apps falling under the racing genre and what is the percentage ratio of positive sentiment reviews? | Tables: playstore -> App, Category, Rating, Reviews, Size, Installs, Type, Price, Content Rating, Genres. user_reviews -> App, Translated_Review, Sentiment, Sentiment_Polarity, S... | what is the average rating of apps falling under the racing genre and what is the percentage ratio of positive sentiment reviews? |
regional_sales | select region from `sales team` group by region order by count(distinct `sales team`) desc limit 1 | Question: which region has the most number of sales team? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Longitude... | which region has the most number of sales team? |
regional_sales | select t from ( select iif(`customer names` like '%group%', `customer names`, null) as t from customers ) where t is not null | Question: list all the customers with name containing the word 'group'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latit... | list all the customers with name containing the word 'group'. |
regional_sales | select avg(`median income`) from `store locations` where type = 'city' | Question: what is the average median income for all city type of stores? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Lati... | what is the average median income for all city type of stores? |
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' | Question: name the sales team and the region of order number 'so - 000137'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, L... | name the sales team and the region of order number 'so - 000137'. |
regional_sales | select distinct t1.productid, t1.`product name` from products as t1 inner join `sales orders` as t2 on t2._productid = t1.productid inner join `sales team` as t3 on t3.salesteamid = t2._salesteamid where t3.`sales team` = 'douglas tucker' | Question: list all the order numbers along with its product name for each order under the sales team of 'douglas tucker'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID... | list all the order numbers along with its product name for each order under the sales team of 'douglas tucker'. |
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`... | Question: among orders in 2020, name the customers who had the greatest discount applied for 'cocktail glasses' | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Nam... | among orders in 2020, name the customers who had the greatest discount applied for 'cocktail glasses' |
regional_sales | select distinct t1.ordernumber, t2.`city name` from `sales orders` as t1 inner join `store locations` as t2 on t2.storeid = t1._storeid where t1.`sales channel` = 'in-store' | Question: list all the order numbers for in-store sales and find the city where the store is located. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County,... | list all the order numbers for in-store sales and find the city where the store is located. |
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 | Question: name the most expensive ordered? who, when was it ordered? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude... | name the most expensive ordered? who, when was it ordered? |
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 | Question: list all the numbers ordered by 'rochester ltd' in 2018. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, ... | list all the numbers ordered by 'rochester ltd' in 2018. |
regional_sales | select distinct t1.`product name`, t3.`sales team` from products as t1 inner join `sales orders` as t2 on t2._productid = t1.productid inner join `sales team` as t3 on t3.salesteamid = t2._salesteamid where t2.warehousecode = 'ware-nmk1003' | Question: provide all the orders from ware-nmk1003. name the product and sales team for each of these order. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, ... | provide all the orders from ware-nmk1003. name the product and sales team for each of these order. |
regional_sales | select t from ( select case when t2.`sales channel` = 'online' then t1.`customer names` else null end as t from customers t1 inner join `sales orders` t2 on t2._customerid = t1.customerid ) where t is not null | Question: list the name of all customers who had made orders online. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude... | list the name of all customers who had made orders online. |
regional_sales | select avg(replace(t1.`unit price`, ',', '') - replace(t1.`unit cost`, ',', '')) from `sales orders` as t1 inner join products as t2 on t2.productid = t1._productid where t2.`product name` = 'bakeware' | Question: calculate the average net profit for bakeware product. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Lo... | calculate the average net profit for bakeware product. |
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 | Question: name the sales team name who had orders with the greatest net profit in 2020. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, St... | name the sales team name who had orders with the greatest net profit in 2020. |
regional_sales | select t1.ordernumber , replace(t1.`unit price`, ',', '') - replace(t1.`unit cost`, ',', '') from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where t2.`sales team` = 'joshua bennett' | Question: sate the order number and calculate the net profit for each order under joshua bennett. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, Sta... | sate the order number and calculate the net profit for each order under joshua bennett. |
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' | Question: among the sales order shipped in july 2018, calculate the percentage of orders for home fragrances. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name,... | among the sales order shipped in july 2018, calculate the percentage of orders for home fragrances. |
regional_sales | select distinct customerid, `customer names` from customers where `customer names` like 'w%' order by `customer names` desc | Question: list down the customer ids and names that start with alphabet 'w'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, ... | list down the customer ids and names that start with alphabet 'w'. |
regional_sales | 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 | Question: list down the product ids and names that include the word 'outdoor'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type... | list down the product ids and names that include the word 'outdoor'. |
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 | Question: among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of ware-nmk1003? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Location... | among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of ware-nmk1003? |
regional_sales | select `city name`, `median income` from `store locations` where state = 'florida' order by population desc limit 1 | Question: mention the most populated city and median income of the store in florida state. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode,... | mention the most populated city and median income of the store in florida state. |
regional_sales | select distinct t2.storeid, t2.`city name`, t1.region from regions as t1 inner join `store locations` as t2 on t2.statecode = t1.statecode where t2.county = 'allen county' | Question: describe the id, city and region of the stores which are in allen country. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State... | describe the id, city and region of the stores which are in allen country. |
regional_sales | select distinct t2.storeid, t2.`city name`, t1.state, t2.type from regions as t1 inner join `store locations` as t2 on t2.statecode = t1.statecode where t2.type = 'borough' or t2.type = 'cdp' | Question: list the id, city, state and region for the store type which is fewer between borough and cdp. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, Coun... | list the id, city, state and region for the store type which is fewer between borough and cdp. |
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' | Question: write down the region and name of the sale team id of 18 and compare their orders between in-store and online. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID,... | write down the region and name of the sale team id of 18 and compare their orders between in-store and online. |
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 ' | Question: calculate the percentage of order via in-store channel of customer 'medline'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, St... | calculate the percentage of order via in-store channel of customer 'medline'. |
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' | Question: describe the customer names and lasting delivery periods for the product of 'bedroom furniture' by wholesale channel in 2019. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locati... | describe the customer names and lasting delivery periods for the product of 'bedroom furniture' by wholesale channel in 2019. |
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 ) wher... | Question: describe the customer names and product names which had over 3800 usd in net profit. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateC... | describe the customer names and product names which had over 3800 usd in net profit. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.