SQL question with attempt on customer information

Data Tables for Question

Question: List all paying customers with users who had 4 or 5 activities during the week of February 15, 2021; also include how many of the activities sent were paid, organic and/or app store. (i.e. include a column for each of the three source types).

My attempt so far:

SELECT source_type, COUNT(*) 
FROM activities 
WHERE activity_time BETWEEN '02-15-21' AND '02-19-21'
GROUP BY source_type

I would like to get a second opinion on it. I didn't include the accounts table because I don't believe that I need it for this query, but I could be wrong.

Read more here: https://stackoverflow.com/questions/66997470/sql-question-with-attempt-on-customer-information

Content Attribution

This content was originally published by ookafor at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: