Skip to content

Instantly share code, notes, and snippets.

@jthandy
Created March 9, 2017 19:13
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 jthandy/875bbd9c5a1982ae666ceef8f23019f4 to your computer and use it in GitHub Desktop.
Save jthandy/875bbd9c5a1982ae666ceef8f23019f4 to your computer and use it in GitHub Desktop.
select
md5(
coalesce(date_day::varchar, '') ||
coalesce(destination_url, '') ||
coalesce(utm_medium, '') ||
coalesce(utm_source, '') ||
coalesce(utm_campaign, '') ||
coalesce(utm_term, '') ||
coalesce(utm_content, '') ||
coalesce(ad_group_id::varchar, '') ||
coalesce(keyword_id::varchar, '')
) as id,
*
from unioned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment