codebase_community Database Schema

Database Description

Database for codebase community.

Schema Structure
Schema information not available for this database.
Example Queries

SQL Query:
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
Evidence:

most answers count refers to MAX(AnswerCount); post by slashnick refers to DisplayName = 'slashnick';

Difficulty: moderate

SQL Query:
SELECT COUNT(Id) FROM users WHERE Upvotes > 100 AND Downvotes > 1
Evidence:

more than 100 upvotes refers to Upvotes > 100; more than 1 downvotes refers to Downvotes > 1

Difficulty: simple

SQL Query:
SELECT CAST(SUM(IIF(T2.Age > 65, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Score > 5
Evidence:

score of over 5 refers to Score > 5; elder user refers to Age > 65; percentage = Divide (Count(Id where Age>65), Count(Id)) * 100

Difficulty: moderate

SQL Query:
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'
Evidence:

"Eliciting priors from experts" is the Title of post; owner refers to DisplayName

Difficulty: simple

SQL Query:
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Examples for teaching: Correlation does not mean causation'
Evidence:

"Examples for teaching: Correlation does not mean causation" is the Title of post; user who last edited refers to LastEditorUserId

Difficulty: moderate
Back to Database Explorer