question
stringlengths
23
286
sql
stringlengths
29
1.45k
db_id
stringclasses
11 values
prompt
stringlengths
1.09k
6.84k
question_id
int64
0
1.53k
difficulty
stringclasses
3 values
List out all post that are related to post ID 61217 and what is the popularity of this post?
SELECT T1.ViewCount FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 61217
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
600
simple
What is the score and the link type ID for post ID 395?
SELECT T1.Score, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 395
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
601
simple
List out all post ID with score more than 60 and list out all the user ID that created these post.
SELECT PostId, UserId FROM postHistory WHERE PostId IN ( SELECT Id FROM posts WHERE Score > 60 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
602
simple
What is the sum of favourite count gained by user ID 686 in 2011?
SELECT SUM(DISTINCT FavoriteCount) FROM posts WHERE Id IN ( SELECT PostId FROM postHistory WHERE UserId = 686 AND STRFTIME('%Y', CreationDate) = '2011' )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
603
simple
What is the average of the up votes and the average user age for users creating more than 10 posts?
SELECT AVG(T1.UpVotes), AVG(T1.Age) FROM users AS T1 INNER JOIN ( SELECT OwnerUserId, COUNT(*) AS post_count FROM posts GROUP BY OwnerUserId HAVING post_count > 10) AS T2 ON T1.Id = T2.OwnerUserId
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
604
moderate
How many users obtained the "Announcer" badge?
SELECT COUNT(id) FROM badges WHERE Name = 'Announcer'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
605
simple
List out the name of badges that users obtained on 7/19/2010 7:39:08 PM.
SELECT Name FROM badges WHERE Date = '2010-07-19 19:39:08.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
606
simple
How many positive comments are there on the list?
SELECT COUNT(id) FROM comments WHERE score > 60
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
607
simple
State the detailed content of the comment which was created on 7/19/2010 7:25:47 PM.
SELECT Text FROM comments WHERE CreationDate = '2010-07-19 19:16:14.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
608
simple
How many posts have a score of 10 on the list?
SELECT COUNT(id) FROM posts WHERE Score = 10
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
609
simple
What are the names of badges that users who have the highest reputation obtained?
SELECT T2.name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId ORDER BY T1.Reputation DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
610
simple
Mention the reputation of users who had obtained the badge on 7/19/2010 7:39:08 PM.
SELECT T1.Reputation FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Date = '2010-07-19 19:39:08.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
611
simple
What is the name of badge that the user whose display name is "Pierre" obtained?
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Pierre'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
612
simple
List out the dates that users who are located in Rochester, NY obtained their badges?
SELECT T2.Date FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Rochester, NY'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
613
simple
Among the users who obtained the "Teacher" badge, calculate their percentage of users
SELECT CAST(COUNT(T1.Id) AS REAL) * 100 / (SELECT COUNT(Id) FROM users) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Teacher'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
614
simple
Among the users who obtained the "Organizer" badges, calculate the percentage of users who are teenagers.
SELECT CAST(SUM(IIF(T2.Age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.`Name` = 'Organizer'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
615
moderate
What is the comment's rating score of the post which was created on 7/19/2010 7:19:56 PM
SELECT T1.Score FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.CreationDate = '2010-07-19 19:19:56.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
616
simple
What is the detailed content of the comment of the post which was created on 7/19/2010 7:37:33 PM?
SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.CreationDate = '2010-07-19 19:37:33.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
617
simple
List out the age of users who located in Vienna, Austria obtained the badge?
SELECT T1.Age FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Vienna, Austria'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
618
simple
How many adults who obtained the badge Supporter?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Supporter' AND T1.Age BETWEEN 19 AND 65
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
619
simple
State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM.
SELECT T1.Views FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Date = '2010-07-19 19:39:08.0'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
620
simple
What are the name of badges that users who have the lowest reputation obtained?
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Reputation = (SELECT MIN(Reputation) FROM users)
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
621
simple
State the name of badge that the user whose display name is "Sharpie" obtained.
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Sharpie'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
622
simple
How many elders obtained the "Supporter" badge?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Age > 65 AND T2.Name = 'Supporter'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
623
simple
What is the name of user with the ID of 30?
SELECT DisplayName FROM users WHERE Id = 30
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
624
simple
How many users were from New York?
SELECT COUNT(Id) FROM users WHERE Location = 'New York'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
625
simple
How many votes were made in 2010?
SELECT COUNT(id) FROM votes WHERE STRFTIME('%Y', CreationDate) = '2010'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
626
simple
How many users were adult?
SELECT COUNT(id) FROM users WHERE Age BETWEEN 19 AND 65
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
627
simple
Which users have the highest number of views?
SELECT Id, DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
628
simple
Calculate the ratio of votes in 2010 and 2011.
SELECT CAST(SUM(IIF(STRFTIME('%Y', CreationDate) = '2010', 1, 0)) AS REAL) / SUM(IIF(STRFTIME('%Y', CreationDate) = '2011', 1, 0)) FROM votes
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
629
simple
What is the name of tags used by John Stauffer's?
SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'John Salvatier'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
630
simple
How many posts were created by Daniel Vassallo?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Daniel Vassallo'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
631
simple
How many votes were made by Harlan?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN votes AS T3 ON T3.PostId = T2.PostId WHERE T1.DisplayName = 'Harlan'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
632
simple
Which post by slashnick has the most answers count? State the post ID.
SELECT T2.PostId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'slashnick' ORDER BY T3.AnswerCount DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
633
moderate
Among posts by Harvey Motulsky and Noah Snyder, which one has higher popularity?
SELECT T1.DisplayName FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'Harvey Motulsky' OR T1.DisplayName = 'Noah Snyder' GROUP BY T1.DisplayName ORDER BY SUM(T3.ViewCount) DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
634
challenging
How many posts by Matt Parker have more than 4 votes?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id INNER JOIN votes AS T4 ON T4.PostId = T3.Id WHERE T1.DisplayName = 'Matt Parker' GROUP BY T2.PostId, T4.Id HAVING COUNT(T4.Id) > 4
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
635
moderate
How many negative comments did Neil McGuigan get in his posts?
SELECT COUNT(T3.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T2.Id = T3.PostId WHERE T1.DisplayName = 'Neil McGuigan' AND T3.Score < 60
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
636
simple
State all the tags used by Mark Meckes in his posts that doesn't have comments.
SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId WHERE T1.DisplayName = 'Mark Meckes' AND T3.CommentCount = 0
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
637
moderate
List all the name of users that obtained the Organizer Badges.
SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Organizer'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
638
simple
Based on posts posted by Community, calculate the percentage of posts that use the R language.
SELECT CAST(SUM(IIF(T3.TagName = 'r', 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN tags AS T3 ON T3.ExcerptPostId = T2.PostId WHERE T1.DisplayName = 'Community'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
639
challenging
Calculate the difference in view count from post posted by mornington and view count from posts posted by Amos.
SELECT SUM(IIF(T1.DisplayName = 'Mornington', T3.ViewCount, 0)) - SUM(IIF(T1.DisplayName = 'Amos', T3.ViewCount, 0)) AS diff FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
640
moderate
How many users received commentator badges in 2014?
SELECT COUNT(Id) FROM badges WHERE Name = 'Commentator' AND STRFTIME('%Y', Date) = '2014'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
641
simple
How many posts were created on 21st July, 2010?
SELECT COUNT(id) FROM postHistory WHERE date(CreationDate) = '2010-07-21'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
642
simple
What are the display names and ages of user who got the highest in views?
SELECT DisplayName, Age FROM users WHERE Views = ( SELECT MAX(Views) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
643
simple
Provide the last edit date and last edit user ID for the post "Detecting a given face in a database of facial images".
SELECT LastEditDate, LastEditorUserId FROM posts WHERE Title = 'Detecting a given face in a database of facial images'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
644
simple
How many negative comments were given by user ID 13?
SELECT COUNT(Id) FROM comments WHERE UserId = 13 AND Score < 60
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
645
simple
Describe the post title which got positive comments and display names of the users who posted those comments.
SELECT T1.Title, T2.UserDisplayName FROM posts AS T1 INNER JOIN comments AS T2 ON T2.PostId = T2.Id WHERE T1.Score > 60
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
646
simple
Provide the badge names received in 2011 for the user whose location is in the North Pole.
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE STRFTIME('%Y', T2.Date) = '2011' AND T1.Location = 'North Pole'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
647
simple
Provide the users' display names and available website URLs of the post with favorite count of more than 150.
SELECT T1.DisplayName, T1.WebsiteUrl FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.FavoriteCount > 150
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
648
simple
Describe the post history counts and last edit date of the post title "What is the best introductory Bayesian statistics textbook?"
SELECT T1.Id, T2.LastEditDate FROM postHistory AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'What is the best introductory Bayesian statistics textbook?'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
649
simple
Describe the last accessed date and location of the users who received the outliers badge.
SELECT T1.LastAccessDate, T1.Location FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'outliers'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
650
simple
Provide the related post title of "How to tell if something happened in a data set which monitors a value over time".
SELECT T3.Title FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id INNER JOIN posts AS T3 ON T1.RelatedPostId = T3.Id WHERE T2.Title = 'How to tell if something happened in a data set which monitors a value over time'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
651
simple
List the post IDs and badge names of the user Samuel in 2013.
SELECT T1.PostId, T2.Name FROM postHistory AS T1 INNER JOIN badges AS T2 ON T1.UserId = T2.UserId WHERE T1.UserDisplayName = 'Samuel' AND STRFTIME('%Y', T1.CreationDate) = '2013' AND STRFTIME('%Y', T2.Date) = '2013'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
652
moderate
What is the owner's display name of the most popular post?
SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts ORDER BY ViewCount DESC LIMIT 1 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
653
simple
Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag.
SELECT T3.DisplayName, T3.Location FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id INNER JOIN users AS T3 ON T3.Id = T2.OwnerUserId WHERE T1.TagName = 'hypothesis-testing'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
654
moderate
Write down the related posts titles and link type IDs of the post "What are principal component scores?".
SELECT T3.Title, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId INNER JOIN posts AS T3 ON T2.RelatedPostId = T3.Id WHERE T1.Title = 'What are principal component scores?'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
655
simple
Describe the display name of the parent ID for child post with the highest score.
SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts WHERE ParentId IS NOT NULL ORDER BY Score DESC LIMIT 1 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
656
simple
Under the vote type of 8, provide the display names and websites URLs of the user who got the highest bounty amount.
SELECT DisplayName, WebsiteUrl FROM users WHERE Id = ( SELECT UserId FROM votes WHERE VoteTypeId = 8 ORDER BY BountyAmount DESC LIMIT 1 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
657
moderate
What are the titles of the top 5 posts with the highest popularity?
SELECT Title FROM posts ORDER BY ViewCount DESC LIMIT 5
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
658
simple
How many tags have post count between 5,000 to 7,000?
SELECT COUNT(Id) FROM tags WHERE Count BETWEEN 5000 AND 7000
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
659
simple
What is the owner user id of the most valuable post?
SELECT OwnerUserId FROM posts WHERE FavoriteCount = ( SELECT MAX(FavoriteCount) FROM posts )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
660
simple
How old is the most influential user?
SELECT Age FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
661
simple
How many posts with votes that were created in 2011 have a bounty of 50?
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T2.BountyAmount = 50 AND STRFTIME('%Y', T2.CreationDate) = '2011'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
662
simple
What is the id of the youngest user?
SELECT Id FROM users WHERE Age = ( SELECT MIN(Age) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
663
simple
What is the score of the post with the most popular tag?
SELECT Score FROM posts WHERE Id = ( SELECT ExcerptPostId FROM tags ORDER BY Count DESC LIMIT 1 )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
664
simple
What is the average monthly number of links created in 2010 for posts that have no more than 2 answers?
SELECT CAST(COUNT(T1.Id) AS REAL) / 12 FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.AnswerCount <= 2 AND STRFTIME('%Y', T1.CreationDate) = '2010'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
665
moderate
Among the posts that were voted by user 1465, what is the id of the most valuable post?
SELECT T2.Id FROM votes AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 1465 ORDER BY T2.FavoriteCount DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
666
simple
What is the title of the post with the oldest post link?
SELECT T1.Title FROM posts AS T1 INNER JOIN postLinks AS T2 ON T2.PostId = T1.Id ORDER BY T1.CreaionDate LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
667
simple
What is the display name of the user who acquired the highest amount of badges?
SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId GROUP BY T1.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
668
simple
When did "chl" cast its first vote in a post?
SELECT T2.CreationDate FROM users AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'chl' ORDER BY T2.CreationDate LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
669
simple
What is the date when the youngest user made his or her first post?
SELECT T2.CreaionDate FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Age IS NOT NULL ORDER BY T1.Age, T2.CreaionDate LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
670
simple
What is the display name of the user who acquired the first Autobiographer badge?
SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Autobiographer' ORDER BY T2.Date LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
671
simple
Among the users located in United Kingdom, how many users whose post have a total favorite amount of 4 or more?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Location = 'United Kingdom' AND T2.FavoriteCount >= 4
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
672
moderate
What is the average number of posts voted by the oldest users?
SELECT AVG(PostId) FROM votes WHERE UserId IN ( SELECT Id FROM users WHERE Age = ( SELECT MAX(Age) FROM users ) )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
673
simple
Who has the highest reputation? Please give the display name.
SELECT DisplayName FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
674
simple
How many users whose reputations are higher than 2000 and the number of views is higher than 1000?
SELECT COUNT(id) FROM users WHERE Reputation > 2000 AND Views > 1000
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
675
simple
Please list all display names of users who are adults.
SELECT DisplayName FROM users WHERE Age BETWEEN 19 AND 65
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
676
simple
How many posts did Jay Stevens have in 2010?
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2010' AND T1.DisplayName = 'Jay Stevens'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
677
simple
Which post by Harvey Motulsky has the most views? Please give the id and title of this post.
SELECT T2.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Harvey Motulsky' ORDER BY T2.ViewCount DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
678
simple
Which post has the highest score? Please give its id and title's name.
SELECT T1.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId ORDER BY T2.Score DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
679
simple
What is the average score of Stephen Turner's posts?
SELECT AVG(T2.Score) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Stephen Turner'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
680
simple
Please list the users' display names whose posts had over 20000 views in 2011.
SELECT T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2011' AND T2.ViewCount > 20000
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
681
simple
Which is the most valuable post in 2010? Please give its id and the owner's display name.
SELECT T2.OwnerUserId, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T1.CreationDate) = '2010' ORDER BY T2.FavoriteCount DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
682
moderate
What is the percentage of posts whose owners had a reputation of over 1000 in 2011?
SELECT CAST(SUM(IIF(STRFTIME('%Y', T2.CreaionDate) = '2011' AND T1.Reputation > 1000, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
683
moderate
Identify the percentage of teenage users.
SELECT CAST(SUM(IIF(Age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(Id) FROM users
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
684
simple
Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time.
SELECT T2.ViewCount, T3.DisplayName FROM postHistory AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id INNER JOIN users AS T3 ON T2.LastEditorUserId = T3.Id WHERE T1.Text = 'Computer Game Datasets'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
685
moderate
Identify the total number of posts with views above average.
SELECT Id FROM posts WHERE ViewCount > ( SELECT AVG(ViewCount) FROM posts )
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
686
simple
How many comments were added to the post with the highest score?
SELECT COUNT(T2.Id) FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId GROUP BY T1.Id ORDER BY SUM(T1.Score) DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
687
simple
Identify the number of posts that have been viewed over 35000 times but have received no comments from other users.
SELECT COUNT(Id) FROM posts WHERE ViewCount > 35000 AND CommentCount = 0
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
688
simple
Identify the display name and location of the user, who was the last to edit the post with ID 183.
SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.Id = 183 ORDER BY T1.LastEditDate DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
689
simple
Identify the latest badge awarded to the user with the display name Emmett.
SELECT T1.Name FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Emmett' ORDER BY T1.Date DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
690
simple
Identify the number of adult users who have cast over 5000 upvotes.
SELECT COUNT(Id) FROM users WHERE Age BETWEEN 19 AND 65 AND UpVotes > 5000
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
691
simple
How long did it take the user, known by his or her display name 'Zolomon' to get the badge? Count from the date the user's account was created.
SELECT T1.Date - T2.CreationDate FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Zolomon'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
692
moderate
Identify the number of posts and comments left by the user, who has the latest created user account.
SELECT COUNT(T2.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T3.PostId = T2.Id ORDER BY T1.CreationDate DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
693
simple
Provide the text of the latest comment to the post with the title 'Analysing wind data with R' and the display name of the user who left it.
SELECT T3.Text, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T2.Id = T3.PostId WHERE T2.Title = 'Analysing wind data with R' ORDER BY T1.CreationDate DESC LIMIT 1
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
694
moderate
How many users were awarded with 'Citizen Patrol' badge?
SELECT COUNT(id) FROM badges WHERE `Name` = 'Citizen Patrol'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
695
simple
Count the number of posts with a tag specified as 'careers'.
SELECT COUNT(Id) FROM tags WHERE TagName = 'careers'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
696
simple
What is the reputation and view count of the user, who is known by his or her display name 'Jarrod Dixon'?
SELECT Reputation, Views FROM users WHERE DisplayName = 'Jarrod Dixon'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
697
simple
How many comments and answers were left by the users on the post with the title 'Clustering 1D data'?
SELECT CommentCount, AnswerCount FROM posts WHERE Title = 'Clustering 1D data'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
698
simple
When did the user known as 'IrishStat' create his or her account?
SELECT CreationDate FROM users WHERE DisplayName = 'IrishStat'
codebase_community
You are a proficient SQLite database engineer. You think step by step and give clear and concise answer. ### Here are all the tables with their properties in a SQLite Database. # #badges (Id integer, UserId integer, Name text, Date datetime, , PRIMARY KEY(Id), FOREIGN KEY(UserId) REFERENCES users(Id)) #comments (Id in...
699
simple