Skip to content

Instantly share code, notes, and snippets.

@derekjn
Created July 8, 2015 16:18
Show Gist options
  • Save derekjn/d124809e991648045109 to your computer and use it in GitHub Desktop.
Save derekjn/d124809e991648045109 to your computer and use it in GitHub Desktop.
CREATE CONTINUOUS VIEW errors_1m AS
SELECT COUNT(*) FROM error_stream
WHERE (arrival_timestamp > clock_timestamp() - interval '5 minutes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment