Created
February 24, 2021 00:33
-
-
Save den-crane/ab51c799ab9eae4da15d09376ec3df27 to your computer and use it in GitHub Desktop.
resample example
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
| select anyResample(100, 190, 30)(t, t), | |
| avgResample(100, 190, 30)(v, t) | |
| FROM | |
| ( | |
| select | |
| [100, 110, 120, 130, 140, 150, 160, 170, 180, 190] time, | |
| [ 1 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 , 3 ] values | |
| ) array join time as t, values as v | |
| ┌─anyResample(100, 190, 30)(t, t)─┬─avgResample(100, 190, 30)(v, t)─┐ | |
| │ [100,130,160] │ [1,2,3] │ | |
| └─────────────────────────────────┴─────────────────────────────────┘ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment