Skip to content

Instantly share code, notes, and snippets.

@mshakhomirov
Created November 24, 2022 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshakhomirov/6ea226c1b5b789d4a31691ce065c20d7 to your computer and use it in GitHub Desktop.
Save mshakhomirov/6ea226c1b5b789d4a31691ce065c20d7 to your computer and use it in GitHub Desktop.
select * from unnest([
struct
(
1 as user_id
, 111 as reputation
, timestamp('2021-12-16 13:00:01') as update_time
),
(
2 --as user_id
, 111 --as reputation
, timestamp('2011-12-16 13:00:01') --as update_time
),
(
3 --as user_id
, 111 --as reputation
, timestamp(format_timestamp("%Y-%m-%d 12:59:01 UTC" ,timestamp(date_sub(current_date(), interval 0 day)))) --as update_time
)
]
) as t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment