每天抽取 %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)
本文标题:数据抽样
本文链接:https://www.haomeiwen.com/subject/wxkbwhtx.html
网友评论