Chinastark/bird_dataset huggingface dataset:
Database: genes
Question: Among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score?
SQL: SELECT interactions.expression_corr FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 INNER JOIN genes ON genes.geneid = interactions.geneid2 WHERE genes.localization = 'nucleus' AND genes.localization = 'nucleus' ORDER BY interactions.expression_corr DESC LIMIT 1
Database: genes
Question: What are the functions of the pair of genes that have the lowest expression correlation score?a
SQL: SELECT genes.function FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 ORDER BY interactions.expression_corr ASC LIMIT 1
Database: genes
Note: If expression_corr < 0, it means the negatively correlated;
Question: Among the pairs of genes that are not from the class of motorproteins, how many of them are negatively correlated?
SQL: SELECT count(genes.geneid) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE interactions.expression_corr < 0 AND genes.class = 'Motorproteins'
Database: genes
Question: For the pairs of genes with one having 8 chromosomes and the other having 6 chromosomes, what is the highest expression correlation score?
SQL: SELECT interactions.expression_corr FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.chromosome = 6 OR genes.chromosome = 8 ORDER BY interactions.expression_corr DESC LIMIT 1
Database: genes
Question: Please list the motif of the genes that are located in the cytoplasm and have 7 chromosomes.
SQL: SELECT interactions.geneid1, interactions.geneid2 FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.localization = 'cytoplasm' AND genes.chromosome = 7
Database: genes
Question: For the non-essential genes whose functions are transcription, how many of them are not located in the cytoplasm?
SQL: SELECT count(genes.geneid) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.localization != 'cytoplasm' AND genes.function = 'TRANSCRIPTION' AND genes.essential = 'NON-Essential'
Database: genes
Note: If expression_corr > 0, it means the expression correlation is positive;
Question: How many pairs of positively correlated genes are both non-essential?
SQL: SELECT count(interactions.geneid2) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE interactions.expression_corr > 0 AND genes.essential = 'Non-Essential'
Database: genes
Note: Positively correlated means expression_corr > 0; Possibility = count(the pairs of genes with both chromosomes over 20) / count(pairs of genes that are positively correlated);
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?
SQL: SELECT cast(sum(iif(genes.chromosome > 10 AND genes.chromosome > 10, 1, 0)) AS REAL) * 100 / count(genes.geneid) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 INNER JOIN genes ON genes.geneid = interactions.geneid2 WHERE interactions.expression_corr > 0
Database: genes
Question: For the pairs of genes both from the class ATPases, what is the average expression correlation score?
SQL: SELECT avg(interactions.expression_corr) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.class = 'ATPases'
Database: genes
Question: Lists all genes by identifier number located in the cytoplasm and whose function is metabolism.
SQL: SELECT DISTINCT geneid FROM genes WHERE localization = 'cytoplasm' AND FUNCTION = 'METABOLISM'
Database: genes
Question: How many different genes do we have if we add those located in the plasma and in the nucleus?
SQL: SELECT count(geneid) FROM classification WHERE localization IN ('plasma', 'nucleus')
Database: genes
Note: If the expression_corr value is negative then it's negatively correlated. Percentage of Negative Correlation = count(negative expression_corr physical type) / count(expression_corr physical type) * 100%;
Question: What kind of expression correlation occurs in physical type interacting gene pairs and what percentage of these are negatively correlated?
SQL: 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'
Database: genes
Note: Percentage = count(genes located in the cytoskeleton unknown class) / count(genes located in the cytoskeleton) * 100%;
Question: What percentage of genes located in the cytoskeleton are of unknown class? And of these, how many are not conditional phenotypes?
SQL: SELECT sum(localization = 'cytoskeleton' AND phenotype = 'Conditional phenotypes') , cast(sum(localization = 'cytoskeleton') AS REAL) * 100 / count(geneid) FROM genes;
Database: genes
Question: What type of interactions occurs in genes whose function is cellular transport and transport medicine and are classified as non-essential?
SQL: SELECT interactions.type FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.function = 'TRANSCRIPTION' AND genes.essential = 'Non-Essential'
Database: genes
Note: If the expression_corr value is positive then it's positively correlated;
Question: List all genes whose interaction is with genes located in the nucleus in which it is positively correlated.
SQL: SELECT genes.geneid FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE interactions.expression_corr > 0 AND genes.localization = 'nucleus'
Database: genes
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.
SQL: SELECT interactions.geneid1 FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.localization = 'nucleus' AND genes.class = 'Transcription factors' AND genes.essential = 'Essential' AND interactions.expression_corr != 0
Database: genes
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?
SQL: SELECT count(genes.geneid) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE interactions.type != 'Physical' AND genes.phenotype = 'Cell cycle defects' AND genes.class != 'Motorproteins' AND genes.essential = 'Non-Essential'
Database: genes
Note: Percentage of no interaction = [count(nucleic acid metabolism, PS00107, no interaction) / count(nucleic acid metabolism, PS00107) * 100%;
Question: Of the genes whose phenotype and motif are nucleic acid metabolism defects, PS00107, what percentage perform positive interaction with another gene?
SQL: SELECT cast(sum(iif(interactions.expression_corr > 0, 1, 0)) AS REAL) * 100 / count(interactions.geneid1) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE genes.phenotype = 'Nucleic acid metabolism defects' AND genes.motif = 'PS00107'
Database: genes
Note: If the expression_corr value is negative then it's negatively correlated; Percentage of Essensity = [count(negatively correlated, genetical interaction, non-essential) / count(negatively correlated, genetical interaction, non-essential+negatively correlated, genetical interaction, essential)] * 100%;
Question: Which negatively correlated, genetically interacting genes are non-essential? What percentage do they represent with respect to those that are essential?
SQL: SELECT cast(count(genes.geneid) AS REAL) * 100 / ( SELECT count(genes.geneid) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE interactions.expression_corr < 0 ) FROM genes INNER JOIN interactions ON genes.geneid = interactions.geneid1 WHERE interactions.expression_corr < 0 AND genes.essential = 'Non-Essential'
Database: app_store
Note: updated in January of 2018 refers to Last Updated BETWEEN 'January 1, 2018' and 'January 31, 2018';
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.
SQL: 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'
Database: app_store
Note: mildly likes the app refers to sentiment_polarity>= 0 and sentiment_polarity<0.5;
Question: How many users mildly likes the 7 Minute Workout app and when was it last updated?
SQL: SELECT count(user_reviews.sentiment_polarity), playstore."Last Updated" FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = '7 Minute Workout' AND user_reviews.sentiment_polarity BETWEEN 0 AND 0.5
Database: app_store
Note: user holds neutral attitude refers to sentiment = 'Neutral';
Question: How many users holds neutral attitude towards the HTC Weather app? Indicate the app's rating on the Google Play Store.
SQL: SELECT count(playstore.rating), playstore.rating FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'HTC Weather' AND user_reviews.sentiment = 'Neutral'
Database: app_store
Note: highest amount of -1 sentiment polarity score refers to MAX(Count(sentiment_polarity = 1.0));
Question: What is the name and category of the app with the highest amount of -1 sentiment polarity score?
SQL: SELECT DISTINCT playstore.app, playstore.category FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.sentiment_polarity = '-1.0'
Database: app_store
Note: average sentiment polarity score = AVG(sentiment_polarity); age group the app is target at refers to content rating;
Question: What is the average sentiment polarity score of the Cooking Fever app? Indicate the age group that the app is targeted at.
SQL: SELECT avg(user_reviews.sentiment_polarity), playstore."Content Rating" FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Cooking Fever'
Database: app_store
Note: lowest sentiment polarity score refers to MIN(sentiment_polarity); user dislike the app pretty much refers to sentiment_polarity<-0.5; number of downloads it has refers to installs;
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?
SQL: SELECT min(user_reviews.sentiment_polarity), playstore.installs FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Basketball Stars'
Database: app_store
Note: sentiment_subjectivity<0.5; current version refers to Current Ver;
Question: For the Akinator app, how many reviews have sentiment subjectivity of no more than 0.5 and what is its current version?
SQL: SELECT count(user_reviews.sentiment_subjectivity), playstore."Current Ver" FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Akinator' AND user_reviews.sentiment_subjectivity < 0.5
Database: app_store
Note: FALSE;
Question: How many apps have rating of 5?
SQL: SELECT count(app) FROM playstore WHERE rating = 5
Database: app_store
Note: free app refers to price = 0; most installed app refers to MAX(installs);
Question: What are the top 5 installed free apps?
SQL: SELECT app FROM playstore WHERE price = 0 ORDER BY cast(replace(replace(installs, ',', ''), '+', '') AS INTEGER) DESC LIMIT 5
Database: app_store
Note: most reviewed app refers to MAX(reviews);
Question: Name the top 10 most reviewed apps.
SQL: SELECT DISTINCT app FROM playstore ORDER BY reviews DESC LIMIT 10
Database: app_store
Note: neutral attitude refers to sentiment = 'Neutral';
Question: How many of the users hold neutral attitude on "10 Best Foods for You" app and what category is this app?
SQL: SELECT count(user_reviews.app), playstore.category FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = '10 Best Foods for You' AND user_reviews.sentiment = 'Neutral'
Database: app_store
Note: users pretty much likes the app refers to sentiment_polarity = 'Positive';
Question: What are the apps that users pretty like this app and how many installs amount of these apps?
SQL: SELECT DISTINCT playstore.app, playstore.installs FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.sentiment_polarity > 0
Database: app_store
Note: lowest rating refers to rating = 1;
Question: List apps whose rating is 3.9 and state the translated review of each app.
SQL: SELECT playstore.app, user_reviews.translated_review FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.rating = 3.9
Database: app_store
Note: compatible with android refers to Android Ver; 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.
SQL: SELECT DISTINCT sentiment FROM user_reviews WHERE app IN ( SELECT app FROM playstore WHERE `android ver` = '8.0 and up' )
Database: app_store
Note: multiple genres refers to COUNT(genres>1; total sentiment subjectivity = Sum(sentiment_subjectivity);
Question: Which apps have multiple genres and what is the total sentiment subjectivity of these apps?
SQL: SELECT sum(user_reviews.sentiment_subjectivity) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.genres > 1
Database: app_store
Note: since year 2015 refers to "Last Updated"<'January 1, 2015';
Question: Which apps have not been updated since year 2015 and what kind of sentiment users hold on it?
SQL: SELECT DISTINCT app, sentiment FROM user_reviews WHERE app IN ( SELECT app FROM playstore WHERE cast(substr('Last Updated', -4, 4) AS INTEGER) < 2015 )
Database: app_store
Note: total installs = SUM(installs);
Question: What is the total installs of apps with content rating of adults only 18+ and what are the translated reviews of it?
SQL: SELECT sum(playstore.installs), user_reviews.translated_review FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore."Content Rating" = 'Adults only 18+'
Database: app_store
Note: best selling app = MAX(MULTIPLY(price, installs));
Question: Which of the app is the best selling app and what is the sentiments polarity of it?
SQL: SELECT playstore.app, user_reviews.sentiment_polarity FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app ORDER BY playstore.price * cast(replace(replace(installs, ',', ''), '+', '') AS INTEGER) DESC LIMIT 1
Database: app_store
Note: average rating = AVG(rating where category = 'COMICS'); number of users who hold a positive attitude towards the app refers to SUM(sentiment = 'Positive');
Question: What is the average rating of comic category apps? How many users hold positive attitude towards this app?
SQL: SELECT avg(playstore.rating) , count(CASE WHEN user_reviews.sentiment = 'Positive' THEN 1 ELSE NULL END) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.category = 'COMICS'
Database: app_store
Note: Draw A Stickman refers to app = 'Draw A Stickman';
Question: What is the rating for "Draw A Stickman"?
SQL: SELECT rating FROM playstore WHERE app = 'Draw A Stickman'
Database: app_store
Note: Brit + Co refers to app = 'Brit + Co'; comment refers to Translated Review NOT null;
Question: How many of the reviews for the app "Brit + Co" have a comment?
SQL: SELECT count(app) FROM user_reviews WHERE app = 'Brit + Co' AND translated_review IS NOT NULL
Database: app_store
Note: shopping apps refers to Genre = 'Shopping'; most reviews refers to MAX(reviews);
Question: List the top 5 shopping apps with the most reviews.
SQL: SELECT DISTINCT app FROM playstore WHERE genres = 'Shopping' GROUP BY app ORDER BY count(app) DESC LIMIT 5
Database: app_store
Note: neutral reviews refers to sentiment = 'Neutral';
Question: How many neutral reviews does the app "Dino War: Rise of Beasts" have?
SQL: SELECT count(app) FROM user_reviews WHERE app = 'Dino War: Rise of Beasts' AND sentiment = 'Neutral'
Database: app_store
Note: installs = '5,000+';
Question: What are the apps with only 5,000+ installs?
SQL: SELECT DISTINCT app FROM playstore WHERE installs = '5,000+'
Database: app_store
Note: negative comment refers to sentiment = 'Negative';
Question: List all the negative comments on the "Dog Run - Pet Dog Simulator" app.
SQL: SELECT translated_review FROM user_reviews WHERE app = 'Dog Run - Pet Dog Simulator' AND sentiment = 'Negative'
Database: app_store
Note: paid app refers to type = 'Paid'; negative comment refers to sentiment = 'Negative'; paid app with most negative comments refers to MAX(COUNT(sentiment = 'Negative')) where type = 'Paid';
Question: Which free app has the most Negative comments?
SQL: SELECT playstore.app FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.type = 'Free' AND user_reviews.sentiment = 'Negative' GROUP BY playstore.app ORDER BY count(user_reviews.sentiment) DESC LIMIT 1
Database: app_store
Note: negative comment refers to sentiment = 'Negative'; installs = '100,000,000+';
Question: How many negative comments are there in all the apps with 100,000,000+ installs?
SQL: SELECT count(user_reviews.sentiment) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.installs = '100,000,000+' AND user_reviews.sentiment = 'Negative'
Database: app_store
Note: app with gr8 in their comments refers to translated_review LIKE '%gr8%';
Question: What are the content ratings for the apps that have "gr8" in their comments?
SQL: SELECT DISTINCT playstore.`content rating` FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.translated_review LIKE '%gr8%'
Database: app_store
Note: total sentiment polarity score = sum(sentiment_polarity); most expensive app refers to MAX(price);
Question: What is the total Sentiment polarity score of the most expensive app?
SQL: SELECT sum(user_reviews.sentiment_polarity) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.price = ( SELECT max(price) FROM playstore )
Database: app_store
Note: Golfshot Plus: Golf GPS refers to app = 'Golfshot Plus: Golf GPS'; review refers to translated_review;
Question: What is the rating for "Garden Coloring Book"? List all of its reviews.
SQL: SELECT playstore.rating, user_reviews.translated_review FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Garden Coloring Book'
Database: app_store
Note: Photography app refers to Genre = 'Photography'; highest total sentiment subjectivity score = MAX(sum(sentiment_subjectivity));
Question: Which Photography app has the highest total Sentiment subjectivity score?
SQL: SELECT playstore.app FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.genres = 'Photography' GROUP BY playstore.app ORDER BY sum(user_reviews.sentiment_subjectivity) DESC LIMIT 1
Database: app_store
Note: comments refers to translated_review; lowest rated refers to rating = 1; Mature 17+ refers to content rating = 'Mature 17+ ';
Question: List all the comments on the lowest rated Mature 17+ app.
SQL: SELECT user_reviews.translated_review FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore."Content Rating" = 'Mature 17+' ORDER BY playstore.rating LIMIT 1
Database: app_store
Note: installments refers to installs; highest total sentiment polarity score = MAX(SUM(sentiment_polarity));
Question: What is the number of installments of the app with the highest total Sentiment polarity score?
SQL: SELECT playstore.installs FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app GROUP BY playstore.app ORDER BY sum(user_reviews.sentiment_polarity) DESC LIMIT 1
Database: app_store
Note: neutral comments refers to sentiment = 'Neutral'; weather app refers to Genre = 'Weather';
Question: What is the number of neutral comments from all the weather apps?
SQL: SELECT count(user_reviews.sentiment) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.genres = 'Weather' AND user_reviews.sentiment = 'Neutral'
Database: app_store
Note: no comment refers to translated_review = 'nan'; most no comment reviews = (MAX(COUNT(translated_review = 'nan')));
Question: Which 1,000,000,000+ intalls apps has the most no comment reviews?
SQL: SELECT playstore.app FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.installs = '1,000,000+' AND user_reviews.translated_review = 'nan' GROUP BY playstore.app ORDER BY count(user_reviews.translated_review) DESC LIMIT 1
Database: app_store
Note: Onefootball - Soccer Scores refers to app = 'Onefootball - Soccer Scores';
Question: What is the rating and the total Sentiment subjectivity score of "Onefootball - Soccer Scores"?
SQL: SELECT playstore.rating, sum(user_reviews.sentiment_subjectivity) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE playstore.app = 'Onefootball - Soccer Scores'
Database: app_store
Note: no comment refers to translated_review = 'nan'; percentage = DIVIDE((SUM(content rating = 'Teen')), COUNT(*));
Question: What percentage of no comment reviews are from "Teen" content rating apps?
SQL: SELECT cast(count(CASE WHEN playstore.`content rating` = 'Teen' THEN 1 ELSE NULL END) AS REAL) * 100 / count(playstore.app) FROM playstore INNER JOIN user_reviews ON playstore.app = user_reviews.app WHERE user_reviews.translated_review = 'nan'
Database: app_store
Note: application name refers to app;
Question: Which apps have 5 rating? List out then application name.
SQL: SELECT DISTINCT app FROM playstore WHERE rating = 5
Database: app_store
Note: reviews>75000000; suitable for teenagers refers to content rating = 'Teen';
Question: Which apps have been reviewed more than 75 000 000 times and the content is suitable for teenagers?
SQL: SELECT DISTINCT app FROM playstore WHERE reviews > 75000000 AND `content rating` = 'Teen'
Database: app_store
Note: downloads and installs are synonyms; installs = '1,000,000,000+';
Question: List out genre that have downloads more than 1000000000.
SQL: SELECT genres FROM playstore WHERE installs = '1,000,000,000+' GROUP BY genres
Database: app_store
Note: average price = AVG(price where Genre = 'Dating'); dating application refers to Genre = 'Dating';
Question: What is the average price for a dating application?
SQL: SELECT avg(price) FROM playstore WHERE genres = 'Dating'
Database: app_store
Note: downloads and installs are synonyms; entertainment apps refers to category = 'ENTERTAINMENT';
Question: What is the average download for entertainment apps with size no more than 1.0 M?
SQL: SELECT avg(cast(replace(replace(installs, ',', ''), '+', '') AS INTEGER)) FROM playstore WHERE category = 'ENTERTAINMENT' AND SIZE < '1.0M'
Database: app_store
Note: average review = AVG(Review); application refers to app; rating = 5;
Question: What is the average review number for application with 5 rating?
SQL: SELECT avg(reviews) FROM playstore WHERE rating = 5
Database: app_store
Note: sentiment review refers to sentiment_polarity; sentiment_polarity>0.5;
Question: List out the top 3 genre for application with a sentiment review greater than 0.5.
SQL: 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 )