Un badge per il tempo di lettura?

Questa query elenca gli utenti che hanno trascorso più di 480 ore a leggere i post. Spero ti sia utile.

-- conversione in millisecondi: [quantità ore * 3600000]: 480 * 3600000 = 1.728.000.000

WITH time_reading AS (
    SELECT 
        user_id, 
        SUM(msecs) AS hours 
    FROM post_timings 
    GROUP BY user_id
    HAVING SUM(msecs) >= 1728000000)

SELECT user_id, CURRENT_TIMESTAMP AS granted_at
FROM time_reading