Skip to content

Instantly share code, notes, and snippets.

@Wittline
Created June 1, 2022 19:44
Show Gist options
  • Save Wittline/9eb4bb41204eee35c6ea94230fcd62a2 to your computer and use it in GitHub Desktop.
Save Wittline/9eb4bb41204eee35c6ea94230fcd62a2 to your computer and use it in GitHub Desktop.
insert into {project}.{dataset}.{tabledestination}
(id, category, lastdate)
select id, category, lastdate
from {project}.{dataset}.{tablesource}
WHERE EXTRACT(YEAR FROM lastdate) = {year} and category = '{category}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment