modx->query("SELECT id, COUNT(tid) AS total FROM trending_counter WHERE created > ".strtotime("-1 days")." GROUP BY id ORDER BY total DESC LIMIT 10");