Liked and Commented
Start Timer
0:00:00
You’re given two tables, users
and events
. The events
table holds values of all of the user events in the action column (‘like’, ‘comment’, or ‘post’).
Write a query to get the percentage of users that have never liked or commented. Round to two decimal places.
Example:
Input:
users
table
Column | Type |
---|---|
id |
INTEGER |
name |
VARCHAR |
created_at |
DATETIME |
events
table
Column | Type |
---|---|
user_id |
INTEGER |
action |
VARCHAR |
created_at |
DATETIME |
Output:
Column | Type |
---|---|
percent_never |
FLOAT |
Recommended questions for you
Personalized based on your user activity, skill level, and preferences.
.
.
.
.
.
.
.
.
.
Comments