Table 1: users_disabled: user_id (int), disabled_reason (string), date(string) Table 2: actors: user_id1(int), user_id2(int), probability_of_same_user(double) Count the number of users for each disable_reason in the past 7 days? question 2 (not sql): Which features make us realise that a user is a returning one?
Sigiloso
SELECT count(user_id), disabled_reason FROM users_disabled WHERE data > current_date - INTERVAL '7 day' GROUP BY disabled_reason;