Join Rockerbox Attribution with Facebook Platform Data
This query demonstrates how to join Rockerbox attribution with Facebook platform metrics.The query operates in two stages:
Aggregate hourly Facebook performance data to daily granularity
Join the aggregated platform dataset to the Rockerbox Buckets Breakdown dataset
Because platform datasets often contain hourly records, they must be aggregated to daily granularity before joining with Rockerbox datasets, which are stored at the daily level.
-- Step 1: Aggregate Facebook platform data to daily granularityWITH facebook_daily_agg AS ( SELECT -- Dimensions identifier, date, mta_tiers_join_key, -- Platform engagement metrics SUM(clicks) AS clicks, SUM(impressions) AS impressions, -- Platform conversion metrics SUM(COALESCE(view_1d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_1d_view, SUM(COALESCE(click_7d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_7d_click, -- Platform revenue metrics SUM(COALESCE(view_value_usd_1d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_revenue_1d_view, SUM(COALESCE(click_value_usd_7d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_revenue_7d_click FROM {platform_facebook_table} WHERE date >= {start_date} AND date <= {end_date} GROUP BY 1,2,3)-- Step 2: Join platform metrics to Rockerbox attribution datasetSELECT -- Dimensions a.date, a.tier_1, a.tier_2, a.tier_3, a.tier_4, a.tier_5, a.platform_join_key, -- Rockerbox attribution metrics b.included_spend, b.even, b.normalized, b.revenue_even, b.revenue_normalized, -- Platform metrics f.clicks, f.impressions, f.purchase_1d_view, f.purchase_7d_click, f.purchase_revenue_1d_view, f.purchase_revenue_7d_clickFROM aggregate_mta a-- Join Facebook platform data to Rockerbox attributionLEFT JOIN facebook_daily_agg f ON f.mta_tiers_join_key = a.platform_join_key AND f.date = a.dateWHERE a.date >= {start_date} AND a.date <= {{end_date}} AND a.conversion_event_id = {{conversion identifier}} AND a.platform ILIKE '%facebook%'ORDER BY 1,2,3,4,5,6;
A LEFT JOIN is recommended when joining platform data to Rockerbox attribution.This ensures that:
All attribution records from Rockerbox remain present in the final dataset.
Platform metrics are appended where matching records exist.
This approach is necessary because Rockerbox attribution may include conversions occurring after platform spend has stopped, due to longer attribution windows supported by Rockerbox.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rockerbox Data Foundation Docs","colors":{"primary":"#14113B","light":"#6E2CB5","dark":"#14113B"},"logo":{"light":"https://mintcdn.com/rockerbox-a0a04d23/FU4jyW_lSaVyNTHM/logo/light.svg?fit=max\u0026auto=format\u0026n=FU4jyW_lSaVyNTHM\u0026q=85\u0026s=5bc12dcd3704f3971957b95335dbd9a2","dark":"https://mintcdn.com/rockerbox-a0a04d23/FU4jyW_lSaVyNTHM/logo/dark.png?fit=max\u0026auto=format\u0026n=FU4jyW_lSaVyNTHM\u0026q=85\u0026s=6cf77c4fc33ff05f9f45d02d2fa584c3"},"favicon":"https://mintcdn.com/rockerbox-a0a04d23/bbhxdcVXuhKs-7E0/favicon.png?fit=max\u0026auto=format\u0026n=bbhxdcVXuhKs-7E0\u0026q=85\u0026s=a5ad46d2b97010d88de5d97202d1f322","navbar":{"links":[{"href":"mailto:support@rockerbox.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.rockerbox.com"}},"footer":{"socials":{"x":"https://x.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://linkedin.com/company/mintlify"}},"interaction":{"drilldown":false},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rockerbox-a0a04d23","hasAudioNarration":false,"actualSubdomain":"rockerbox-a0a04d23","customDomains":["data-foundation.rockerbox.com"],"gitSource":{"type":"github","owner":"rockerbox","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae5183a0c1b7e210c446c4a","collectionId":"72c06639-ec6c-4cd8-a3bb-7a18a7cdcaae","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae5183a0c1b7e210c446c4a"},"entitlements":{},"buildId":"6ae5183a0c1b7e210c446c4a","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Marketing Integrations","count":82},{"language":"default","tag":"Marketing","count":80},{"language":"default","tag":"Warehousing","count":59},{"language":"default","tag":"Display and Native","count":25},{"language":"default","tag":"Getting Started","count":13},{"language":"default","tag":"Schemas","count":13},{"language":"default","tag":"Paid Social","count":8},{"language":"default","tag":"Analytics Use Cases","count":8},{"language":"default","tag":"Streaming Video / OTT","count":7},{"language":"default","tag":"Platform Data","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"warehousing/analytics-join-attribution-platform-data","slug":"/warehousing/analytics-join-attribution-platform-data","pageMetadata":{"title":"Enrich Attribution with Platform Data","description":"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.","href":"/warehousing/analytics-join-attribution-platform-data"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`description`,children:`Description`}),`\n`,_jsxs(_components.p,{children:[`This analysis demonstrates how to join `,_jsx(_components.strong,{children:`Rockerbox attribution data`}),` with `,_jsx(_components.strong,{children:`performance metrics reported directly by advertising platforms`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`when-to-use-this-analysis`,children:`When to Use This Analysis`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Build unified marketing performance reports combining `,_jsx(_components.strong,{children:`ad platform metrics and attribution results`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Analyze `,_jsx(_components.strong,{children:`clicks, impressions, conversions, and revenue`}),` alongside Rockerbox’s attribution outputs.`]}),`\n`,_jsxs(_components.li,{children:[`Evaluate duplicated `,_jsx(_components.strong,{children:`platform-reported performance metrics`}),` against Rockerbox deduplicated attribution.`]}),`\n`,_jsxs(_components.li,{children:[`Evaluate differences between `,_jsx(_components.strong,{children:`platform attribution windows`}),` and Rockerbox attribution results.`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`source-data`,children:`Source Data`}),`\n`,_jsx(_components.p,{children:`This analysis joins two datasets.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Dataset`}),_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aggregate_mta`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`date`})}),_jsx(_components.td,{children:`Date of the attributed conversion`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aggregate_mta`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`tier_1`}),`–`,_jsx(_components.code,{children:`tier_5`})]}),_jsx(_components.td,{children:`Marketing channel hierarchy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aggregate_mta`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`platform_join_key`})}),_jsx(_components.td,{children:`Identifier used to link attribution records to platform data`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aggregate_mta`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`included_spend`})}),_jsx(_components.td,{children:`Marketing spend associated with the placement`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aggregate_mta`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`even`}),`, `,_jsx(_components.code,{children:`normalized`})]}),_jsx(_components.td,{children:`Attribution credit metrics`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aggregate_mta`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`revenue_even`}),`, `,_jsx(_components.code,{children:`revenue_normalized`})]}),_jsx(_components.td,{children:`Revenue attributed by Rockerbox`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`platform_\u003cplatform>`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`mta_tiers_join_key`})}),_jsx(_components.td,{children:`Join key linking platform data to Rockerbox attribution`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`platform_\u003cplatform>`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`clicks`}),`, `,_jsx(_components.code,{children:`impressions`})]}),_jsx(_components.td,{children:`Platform-reported engagement metrics`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`platform_\u003cplatform>`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase_*`})}),_jsx(_components.td,{children:`Platform-reported conversion metrics`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`key-metrics`,children:`Key Metrics`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Metric`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`spend`})}),_jsx(_components.td,{children:`Marketing spend reported in Rockerbox`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`even`})}),_jsx(_components.td,{children:`Even-weight attributed conversions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`normalized`})}),_jsx(_components.td,{children:`Modeled multi-touch attributed conversions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`revenue_even`})}),_jsx(_components.td,{children:`Revenue attributed using even-weight attribution`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`revenue_normalized`})}),_jsx(_components.td,{children:`Revenue attributed using modeled attribution`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`clicks`})}),_jsx(_components.td,{children:`Platform-reported clicks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`impressions`})}),_jsx(_components.td,{children:`Platform-reported impressions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase_1d_view`})}),_jsx(_components.td,{children:`Platform-reported purchases attributed to 1-day view`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase_7d_click`})}),_jsx(_components.td,{children:`Platform-reported purchases attributed to 7-day click`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`example-queries`,children:`Example Queries`}),`\n`,_jsx(Heading,{level:`2`,id:`join-rockerbox-attribution-with-facebook-platform-data`,children:`Join Rockerbox Attribution with Facebook Platform Data`}),`\n`,_jsx(_components.p,{children:`This query demonstrates how to join Rockerbox attribution with Facebook platform metrics.`}),`\n`,_jsx(_components.p,{children:`The query operates in two stages:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Aggregate hourly Facebook performance data to `,_jsx(_components.strong,{children:`daily granularity`})]}),`\n`,_jsxs(_components.li,{children:[`Join the aggregated platform dataset to the Rockerbox `,_jsx(_components.strong,{children:`Buckets Breakdown dataset`})]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Because platform datasets often contain `,_jsx(_components.strong,{children:`hourly records`}),`, they must be aggregated to `,_jsx(_components.strong,{children:`daily granularity`}),` before joining with Rockerbox datasets, which are stored at the daily level.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`74`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`74`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Step 1: Aggregate Facebook platform data to daily granularity`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WITH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` facebook_daily_agg `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SELECT`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Dimensions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` identifier,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mta_tiers_join_key,`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Platform engagement metrics`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(clicks) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` clicks,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(impressions) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` impressions,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Platform conversion metrics`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`COALESCE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(view_1d:offsite_conversion_fb_pixel_purchase,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` purchase_1d_view,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`COALESCE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(click_7d:offsite_conversion_fb_pixel_purchase,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` purchase_7d_click,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Platform revenue metrics`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`COALESCE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(view_value_usd_1d:offsite_conversion_fb_pixel_purchase,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` purchase_revenue_1d_view,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`COALESCE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(click_value_usd_7d:offsite_conversion_fb_pixel_purchase,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` purchase_revenue_7d_click`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {platform_facebook_table}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHERE`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`start_date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AND`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {end_date}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` GROUP BY`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Step 2: Join platform metrics to Rockerbox attribution dataset`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Dimensions`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`tier_1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`tier_2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`tier_3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`tier_4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`tier_5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`platform_join_key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Rockerbox attribution metrics`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`included_spend`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`even`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`normalized`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`revenue_even`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` b`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`revenue_normalized`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- Platform metrics`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`clicks`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`impressions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`purchase_1d_view`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`purchase_7d_click`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`purchase_revenue_1d_view`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`purchase_revenue_7d_click`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` aggregate_mta a`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Join Facebook platform data to Rockerbox attribution`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`LEFT JOIN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` facebook_daily_agg f`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ON`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`mta_tiers_join_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`platform_join_key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AND`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`start_date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AND`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {{end_date}}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AND`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`conversion_event_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {{conversion identifier}}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AND`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`platform`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ILIKE `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'%facebook%'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ORDER BY`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`notes-on-join-strategy`,children:`Notes on Join Strategy`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`LEFT JOIN`}),` is recommended when joining platform data to Rockerbox attribution.`]}),`\n`,_jsx(_components.p,{children:`This ensures that:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`All attribution records from Rockerbox remain present in the final dataset.`}),`\n`,_jsx(_components.li,{children:`Platform metrics are appended where matching records exist.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`This approach is necessary because Rockerbox attribution may include conversions occurring `,_jsx(_components.strong,{children:`after platform spend has stopped`}),`, due to longer attribution windows supported by Rockerbox.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Enrich Attribution with Platform Data","description":"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.","href":"/warehousing/analytics-join-attribution-platform-data"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Description","slug":"description","depth":1,"children":[]},{"title":"When to Use This Analysis","slug":"when-to-use-this-analysis","depth":1,"children":[]},{"title":"Source Data","slug":"source-data","depth":1,"children":[]},{"title":"Key Metrics","slug":"key-metrics","depth":1,"children":[]},{"title":"Example Queries","slug":"example-queries","depth":1,"children":[]},{"title":"Join Rockerbox Attribution with Facebook Platform Data","slug":"join-rockerbox-attribution-with-facebook-platform-data","depth":2,"children":[]},{"title":"Notes on Join Strategy","slug":"notes-on-join-strategy","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rockerbox-a0a04d23","siteName":"Rockerbox Data Foundation Docs","title":"Enrich Attribution with Platform Data - Rockerbox Data Foundation Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-19T20:29:53.489Z","originalFileLocation":"warehousing/analytics-join-attribution-platform-data.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rockerbox Data Foundation Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Enrich Attribution with Platform Data - Rockerbox Data Foundation Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rockerbox Data Foundation Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rockerbox-a0a04d23.mintlify.app/_mintlify/api/og/v2?division=Analytics+Use+Cases\u0026amp;title=Enrich+Attribution+with+Platform+Data\u0026amp;description=Combine+Rockerbox+aggregate+attribution+metrics+with+platform-reported+performance+metrics.\u0026amp;theme=e0a758bfb6d8c806e0190654\u0026amp;signature=2706752b0d564d9d818bb7e6722a6ae8cf11d06de33ffc642c333a4c435b827f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Enrich Attribution with Platform Data - Rockerbox Data Foundation Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rockerbox-a0a04d23.mintlify.app/_mintlify/api/og/v2?division=Analytics+Use+Cases\u0026amp;title=Enrich+Attribution+with+Platform+Data\u0026amp;description=Combine+Rockerbox+aggregate+attribution+metrics+with+platform-reported+performance+metrics.\u0026amp;theme=e0a758bfb6d8c806e0190654\u0026amp;signature=2706752b0d564d9d818bb7e6722a6ae8cf11d06de33ffc642c333a4c435b827f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/rockerbox-a0a04d23/RiNncvf043jb9nSD/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rockerbox Data Foundation Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#14113B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/warehousing/analytics-join-attribution-platform-data.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://data-foundation.rockerbox.com/#organization\",\"name\":\"Rockerbox Data Foundation Docs\",\"url\":\"https://data-foundation.rockerbox.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rockerbox-a0a04d23/FU4jyW_lSaVyNTHM/logo/light.svg?fit=max\u0026auto=format\u0026n=FU4jyW_lSaVyNTHM\u0026q=85\u0026s=5bc12dcd3704f3971957b95335dbd9a2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://data-foundation.rockerbox.com#website\",\"name\":\"Rockerbox Data Foundation Docs\",\"url\":\"https://data-foundation.rockerbox.com\",\"publisher\":{\"@id\":\"https://data-foundation.rockerbox.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data#webpage\",\"url\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data\",\"name\":\"Enrich Attribution with Platform Data\",\"description\":\"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.\",\"dateModified\":\"2026-03-19T20:29:53.489Z\",\"isPartOf\":{\"@id\":\"https://data-foundation.rockerbox.com#website\"},\"breadcrumb\":{\"@id\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Warehousing\",\"item\":\"https://data-foundation.rockerbox.com/warehousing/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Analytics Use Cases\",\"item\":\"https://data-foundation.rockerbox.com/warehousing/analytics-overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enrich Attribution with Platform Data\",\"item\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data#article\",\"headline\":\"Enrich Attribution with Platform Data\",\"name\":\"Enrich Attribution with Platform Data\",\"description\":\"Combine Rockerbox aggregate attribution metrics with platform-reported performance metrics.\",\"url\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data\",\"mainEntityOfPage\":{\"@id\":\"https://data-foundation.rockerbox.com/warehousing/analytics-join-attribution-platform-data#webpage\"},\"dateModified\":\"2026-03-19T20:29:53.489Z\",\"publisher\":{\"@id\":\"https://data-foundation.rockerbox.com/#organization\"},\"isPartOf\":{\"@id\":\"https://data-foundation.rockerbox.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rockerbox Data Foundation Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Rockerbox Data Foundation Docs","nav":{"global":null,"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":""}]},{"tab":"Marketing Integrations","pages":[{"title":"Marketing Integrations","href":"/supported-integrations/marketing/overview"}]},{"tab":"Warehousing","groups":[{"group":"Warehousing","pages":[{"group":"Quickstart","pages":[{"title":"Getting Started","href":"/warehousing/quickstart"},{"title":"Connect to Snowflake","href":"/warehousing/snowflake"},{"title":"Connect to Google BigQuery","href":"/warehousing/bigquery"},{"title":"Connect to Amazon Redshift","href":"/warehousing/redshift"},{"title":"Snowflake Reader Account","href":"/warehousing/snowflake-reader"}]},{"group":"Schemas","pages":[{"title":"Schema Overview","href":"/warehousing/schemas"},{"group":"First Party Event Data","pages":[{"title":"Log Conversions","href":"/warehousing/schema-log-conversion"}]},{"group":"Attribution Data","pages":[{"title":"Log MTA","href":"/warehousing/schema-log-mta"},{"title":"Aggregate MTA","href":"/warehousing/schema-aggregate-mta"}]},{"group":"Platform Data","pages":[{"title":"Platform - Google","href":"/warehousing/schema-platform-google"},{"title":"Platform - Facebook","href":"/warehousing/schema-platform-facebook"},{"title":"Platform - TikTok","href":"/warehousing/schema-platform-tiktok"},{"title":"Platform - Bing","href":"/warehousing/schema-platform-bing"},{"title":"Platform - Snapchat","href":"/warehousing/schema-platform-snapchat"},{"title":"Platform - Pinterest","href":"/warehousing/schema-platform-pinterest"},{"title":"Platform - LinkedIn","href":"/warehousing/schema-platform-linkedin"}]},{"group":"Normalization \u0026 Metadata","pages":[{"title":"Taxonomy Lookup","href":"/warehousing/schema-taxonomy-lookup"},{"title":"Conversion Event Metadata","href":"/warehousing/schema-conversion-event-metadata"}]}]},{"group":"Analytics Use Cases","pages":[{"title":"Use Cases Overview","href":"/warehousing/analytics-overview"},{"title":"Replicate Cross-Channel Attribution Report","href":"/warehousing/analytics-replicate-cross-channel-ui-report"},{"title":"Build CPA/ROAS From Log Level MTA","href":"/warehousing/analytics-kpis-from-log-mta"},{"title":"Customize Attribution Windows","href":"/warehousing/analytics-customize-attribution-windows"},{"title":"Evaluate Meta Click vs. View Through Attribution","href":"/warehousing/analytics-mta-eval-clicks-views"},{"title":"Time to Conversion","description":"This guide explains how to compute **time to conversion** using the **Log Level MTA** dataset.","href":"/warehousing/analytics-time-to-convert"},{"title":"Enrich Attribution with Platform Data","href":"/warehousing/analytics-join-attribution-platform-data"},{"title":"Product Breakdowns","description":"Extract product-level context stored in the conversions dataset to support product-level performance and revenue analysis.","href":"/warehousing/analytics-product-breakdowns"}]},{"group":"Schema Migration Guides","pages":[{"title":"Aggregate MTA Migration","href":"/warehousing/aggregate-mta-migration-guide"},{"title":"Aggregate MTA: Partition Column Removal","href":"/warehousing/aggregate-mta-partition-migration"}]}]}]}]},"basePath":"","title":"Enrich Attribution with Platform Data - Rockerbox Data Foundation Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}