Posts Categorized: mySQL

Drupal – number of registrations by month

Useful query – shows how many users registered on a Drupal site each month: select count(uid), month(from_unixtime(created)) as bmonth, year(from_unixtime(created)) as byear from users group by bmonth, byear order by byear, bmonth; SELECT count(uid), MONTH(FROM_UNIXTIME(created)) as bmonth, YEAR(FROM_UNIXTIME(created)) as byear FROM users GROUP BY bmonth, byear ORDER BY byear, bmonth;

Posted