Created
September 16, 2014 02:28
-
-
Save githoov/942cc3addc82813790ed to your computer and use it in GitHub Desktop.
date_series_mysl
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
- view: day_sequence | |
derived_table: | |
sql: | | |
SELECT DATE(DATE_ADD('2010-01-01', INTERVAL @i := @i + 1 day)) AS series | |
FROM orders, (SELECT @i := 0) AS i_table | |
WHERE @i < DATEDIFF(CURDATE(), '2010-01-01') + 1 | |
sql_trigger_value: SELECT CURDATE() | |
indexes: [series] | |
fields: | |
- dimension: series | |
type: date | |
sql: ${TABLE}.series |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment