How to count users in
I have a user table, an events table (containing a city location), and an
RSVP table (who went to which event). I'd like to analyse which users went
to the most events in a particular city.
I think I need a new table called user_location_counts in which I have the
columns user, location and count, where count is the count of the RSVPs of
a given user in a given city. Then, I only need to order by count.
What is the most efficient way to build this table? Is there a better way
to do it? I have about 3M users meaning efficiency is very important.
No comments:
Post a Comment