Mysql
 sql >> Base de données >  >> RDS >> Mysql

Grouper uniquement les lignes adjacentes

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