postgresql-topn icon indicating copy to clipboard operation
postgresql-topn copied to clipboard

Weighted Add

Open rodhoward opened this issue 1 month ago • 0 comments

I'm not sure if this is possible or not but I have account session data that we're storing in a massive table. Data like mac address, bytes downloaded, uploaded, session duration etc.

I'd like to report on that data in a Top users (mac address) report. E.G top 10 users by downloads. or top 10 users by session duration. Is there a way to do that.. using this extension it seems like this is what its for?

I think I can do a top 10 users by session count.. as that is just the frequency of the mac address in the account sessions table.. however that is the only one of the reports (order by's) that I need. My idea was to have multiple topN columns in a summary table and then lookup those mac addresses in the main table once I have the list of top 10 to narow down my query. e.g. topUsersBySessionCount topUsersByDuration topUsersByDownloads etc.

Can you confirm if this is possible or not using TopN..

Regards Rod

rodhoward avatar Dec 17 '25 23:12 rodhoward