Skip to content

Instantly share code, notes, and snippets.

@PMeinshausen
Created September 18, 2014 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PMeinshausen/f88634b0833ff41051e7 to your computer and use it in GitHub Desktop.
Save PMeinshausen/f88634b0833ff41051e7 to your computer and use it in GitHub Desktop.
--Syntax (version 1.0)
--You call this function by combining a local row function followed by a partition function:
SELECT * FROM ApproxDCountReduce(
ON(SELECT * FROM ApproxDCountMap(
ON {table_name | view_name | (query)}
COLUMNS ('column_name')
[ERROR ('error_tolerance')]
)
)
PARTITION BY expression [, ...]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment