Skip to content

Instantly share code, notes, and snippets.

@den-crane
Created February 24, 2021 00:33
Show Gist options
  • Select an option

  • Save den-crane/ab51c799ab9eae4da15d09376ec3df27 to your computer and use it in GitHub Desktop.

Select an option

Save den-crane/ab51c799ab9eae4da15d09376ec3df27 to your computer and use it in GitHub Desktop.
resample example
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