Frage

Background: I have a Data Mart based on a star schema structure (i.e. Fact and Dimension tables).

I've mastered the art of determining a normal count of the number of user logins for any combination of a dimensions including date ranges, interfaces and regions.

Problem: I get stuck when I try to determine the number of unique logins, since, for example, the unique number of logins for any set of days is not the sum of the unique number of logins for each day in that set.

My horrible solution: I'm completely out of ideas other than storing every single login in a table with the timestamp and the user id.

War es hilfreich?

Lösung

Your solution seems fine to me (unless you're dealing with a really big number of logins and the performance will be a problem).

The more granular data you store in the fact table the more flexible it is and supports more possible queries and calculations.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top