Created
November 1, 2018 15:10
-
-
Save Tattoo/5b75ea42a971b05759cf09176b535c70 to your computer and use it in GitHub Desktop.
Self-validating SQL queries for interactive
This file contains 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
-- https://stackoverflow.com/a/754570 | |
SELECT CONCAT( | |
'Sufficient and sufficiently varied month_value test data: ', | |
CASE WHEN ( | |
SELECT COUNT(DISTINCT y, m) FROM month_value | |
) > 10 | |
AND ( | |
SELECT COUNT(DISTINCT y) FROM month_value | |
) > 3 | |
THEN 'passed' | |
ELSE 'failed' | |
END | |
) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment