I have Moodle 2.5 and 2.6 versions.
I am just wondering if the below SQL query is a correct approach to obtain unique total users every month?
SELECT id,username,from_unixtime(`lastlogin`) AS `days` from <database name>.<prefix>_user where date(from_unixtime(`lastlogin`)) between date ('2017-12-01 00:00:00') and date('2017-12-31 23:59:59');
I know that this can be done using this ad-hoc contributed report - Distinct user logins per month but this is only effective above version 2.7 of Moodle.
Any advise is deeply appreciated.