I have the following table structure, A -< B represents one A can have many B
User -< Computer -< ComputerConfiguration -< Benchmark >- GameVersion >- Game
They are connected with PK int keys.
One user can have many computers, computer can have many configurations, configuration can have many benchmarks, and benchmark has FK to game version which has FK to game
How can I count a total number of unique games for each user?
Can I count number of computers, benchmarks and games per user – all in one query?
To be 100% specific on the answer we’d need to know which DBE you’re using.
Please note this is just pseudo code, the general idea though would be…
to answer your next question, if you want all of those counts in a single query you’ll need to employ some sub-queries.
… and so on