Más ejemplos de consultas de este tipo:
Código:
SELECT
rc_namespace as espacio_nombre,
COUNT(rc_namespace) as ediciones,
COUNT(rc_namespace) / 7 as promedio
WHERE TO_DAYS(NOW()) - TO_DAYS(rc_timestamp) <= 7
GROUP BY rc_namespace
Código:
SELECT rc_user_text as usuario, COUNT(rc_user_text) as ediciones
FROM recentchanges
WHERE TO_DAYS(NOW()) - TO_DAYS(rc_timestamp) <= 7
GROUP BY rc_user_text
ORDER BY ediciones DESC
Código:
SELECT COUNT(rc_title) as borrados
FROM recentchanges
WHERE rc_title = 'Registro_de_borrados'
AND rc_namespace=4
AND TO_DAYS(NOW()) - TO_DAYS(rc_timestamp) <= 7
GROUP BY rc_title
Saludos :)