I am trying to analyze how far players of the game progress as a function of age. The age is measured as the number of days since game installation.

For active players who played the game at a certain age (days from installation), the following group by age and get average level works.

SELECT Avg(Level_events.level_number) AS AvgOflevel_number, 
       DateDiff("d",[Installation_events]![timestamp],[Level_events]![timestamp]) AS Age
FROM Level_events 
LEFT JOIN Installation_events ON Level_events.player_id = Installation_events.player_id
GROUP BY DateDiff("d",[Installation_events]![timestamp],[Level_events]![timestamp]);

However, for All players including those who happened not to play at a certain age, i can't access the data after I apply the group by.

my aim is to create SQL script with queries that calculate both the average progress by age of active players and all players


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.