0
假设我有一个week_nbr和cust_id表。Teradata中组中的数据示例
假设我需要每周有500位客户的样本。
装聋作哑的方法是为每星期做:
select cust_id
from week_cust
sample randomized allocation 500
where week_nbr=1
什么是聪明的办法?也就是说,有没有办法让以下概念有效?
select week_nbr
,random sample of 500 cust_id in this week
from week_cust
这是在Teradata上12
最佳,并且由于事先。