-- opengid_base_data 数据样例
-- 每个渠道取 5 条记录

SELECT  *
FROM    (
            SELECT  *
                    ,ROW_NUMBER() OVER (PARTITION BY channel ORDER BY 点击时间 DESC) AS rn
            FROM    loghubods.opengid_base_data
            WHERE   dt = ${start}
        ) t
WHERE   rn <= 20
;
