每天抽取 %5
select *
from (
SELECT a ,date
,sum(1) over(partition by date) as date_cnt
,row_number() over(partition by date order by md5(a)) as seq
FROM A
) t
where seq <= round(date_cnt * %5)
每天抽取 %5
select *
from (
SELECT a ,date
,sum(1) over(partition by date) as date_cnt
,row_number() over(partition by date order by md5(a)) as seq
FROM A
) t
where seq <= round(date_cnt * %5)