Sample a data science interview question
Get the solution via email
Given a users
table and a user_comments
table, write a SQL query to generate a histogam of number of comments per user in the month of January 2020. Assume bin buckets intervals of one.
`users` table
columns
type
id
int
name
varchar
joined_at
datetime
city_id
int
device
int
`user_comments` table
columns
type
user_id
int
body
text
created_at
datetime
This question was asked by
