Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eliashussary/1af9345106300ff267f25dd596305f65 to your computer and use it in GitHub Desktop.
Save eliashussary/1af9345106300ff267f25dd596305f65 to your computer and use it in GitHub Desktop.
insert into "uiEvents"
select
row_number() over (order by id) + (select coalesce(max(id),0) from "uiEvents") as "id",
id as "userId",
tmp."eventTypes" as "eventType",
"createdAt",
"updatedAt"
from
users,
(select unnest(ARRAY['ONBOARD_MODAL','ONBOARD_SEARCH_TOUR']) as "eventTypes") as tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment