Liked and Commented

Start Timer

0:00:00

Upvote
17
Downvote
Save question
Mark as completed
View comments (62)
Next question

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
.
.
.
.
.


Comments

Loading comments