codebase_community Database Schema

Database Description

Database for codebase community.

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

SQL Query:
SELECT T1.Age FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Vienna, Austria'
Evidence:

"Vienna, Austria" is the Location

Difficulty: simple

SQL Query:
SELECT DisplayName FROM users WHERE STRFTIME('%Y', CreationDate) = '2011'
Evidence:

account created in the year 2011 refers to year(CreationDate) = 2011

Difficulty: simple

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

the latest comment refers to MAX(CreationDate);

Difficulty: moderate

SQL Query:
SELECT AVG(PostId) FROM votes WHERE UserId IN ( SELECT Id FROM users WHERE Age = ( SELECT MAX(Age) FROM users ) )
Evidence:

average number of posts voted refers to AVG(PostId) FROM votes; the oldest users refer to MAX(Age);

Difficulty: simple

SQL Query:
SELECT CreationDate FROM votes GROUP BY CreationDate ORDER BY COUNT(Id) DESC LIMIT 1
Evidence:

the creation date of the maximum number of votes refers to CreationDate where Max(Count(Id))

Difficulty: simple
Back to Database Explorer