Created
September 29, 2014 03:04
-
-
Save PMeinshausen/60c35cb9b4fe6bfed873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Syntax (version 1.0) | |
--Unconditional sampling, single sample rate | |
select * from sample( | |
ON ... | |
SAMPLEFRACTION('fraction') | |
[Seed('seed')] | |
--Unconditional sampling, total approximate sample size | |
select * from sample ( | |
ON ... as data PARTITION BY ANY | |
ON ... as summary DIMENSION | |
ApproximateSampleSize('size') | |
[Seed('seed')] | |
--conditional simple sampling, single sample rate | |
select * from sample ( | |
ON ... | |
CONDITIONONCOLUMN('column') | |
CONDITIONON('cond1'[,'cond2',...]) | |
SAMPLEFRACTION('fraction') | |
[SEED('seed')] | |
--Conditional sampling, variable sample rates | |
select * from sample ( | |
ON ... | |
CONDITIONONCOLUMN('column') | |
CONDITIONON('cond1'[,'cond2',...]) | |
SAMPLEFRACTION('f1'[,'f2','f3',...]) | |
[SEED('seed')] | |
--Conditional sampling, total approximate sample size | |
select * from sample ( | |
ON ... as data PARTITION BY ANY | |
ON ... as summary DIMENSION | |
CONDITIONONCOLUMN('column') | |
CONDITIONON('cond1'[,'cond2',...]) | |
ApproximateSampleSize('total_sample_size') | |
[SEED('seed')] | |
--Conditional sampling, variable approximate sample sizes | |
select * from sample ( | |
ON ... as data PARTITION BY ANY | |
ON ... as summary DIMENSION | |
CONDITIONONCOLUMN('column') | |
CONDITIONON('cond1'[,'cond2',...]) | |
APPROXIMATESAMPLESIZE('s1'[,'s2',...]) | |
[SEED('seed')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment