Mysql
 sql >> Database >  >> RDS >> Mysql

Raggruppa solo le righe adiacenti

SELECT  user_id
FROM    notifies n
WHERE   NOT
        (
        SELECT  user_id
        FROM    notifies ni
        WHERE   ni.id < n.id
        ORDER BY
                id DESC
        LIMIT 1
        ) <=> user_id