43. サンプルテーブルを作る方法と直接クエリーする方法がある
• 一般的なDDL、SQLにサンプリングのための情報を指定する
43
CREATE SAMPLE TABLE CreditCardTxHistorySample
ON CreditCardTxHistory
OPTIONS(
qcs 'POS, Year, Month',
fraction '0.03')
AS (SELECT * FROM CreditCardHistory)
SELECT
POS,
AVG(TxAmount)
FROM
CreditCardTxHistory
GROUP BY
POS
ORDER BY
POS
WITH ERROR 0.10 CONFIDENCE 0.95
サンプルテーブル Approximate Query