- (SUM (total_cost)/100000)/ (SUM (impressions)) *1000 AS avg_cpm
- ((SUM (spend)/100000000)/SUM (impressions)) *1000 AS avg_cpm
- ((SUM (total_cost)/100000)/SUM (impressions))/1000 AS avg_cpm
The correct answer is: ((SUM (spend)/100000000)/SUM (impressions)) *1000 AS avg_cpm
Explanation: To calculate Amazon DSP CPM using the fields in the dsp_impressions table, use the following formula:
((SUM(spend)/100000000)/SUM(impressions))*1000 AS avg_cpm
This formula converts microcents (the unit used for spend in AMC) into dollars, divides by total impressions to get cost per impression, and then multiplies by 1000 for cost per thousand impressions (CPM).
Reference content: From the official Amazon documentation (DSP impressions table):
“audience_fee, bid_price, spend, managed_service_fee, platform_fee, supply_cost, and third_party_fees … To convert spend to dollars, divide by 100,000,000 (microcents). CPM can be calculated as the total cost divided by impressions, times 1,000 (per thousand impressions).”