渠道流量来源分析报表为什么外部推广下单金额偏高
服务器 192.168.2.225 53507
外部推广的id算法:OTag 第一个数字/10万 %10 =3,则渠道来源是外部推广。
t_trade(商品明细表) ext_11002 是 Otag 字段
select
SUM(OFee) as 下单金额,
--SUBSTRING (Otag, CHARINDEX('-',OTag)-6, 1) as 外部推广,
Otag,OId,OrderDate,Qty,UId,wh_id
from (
SELECT ISNULL(tr.ext_11002, '') as OTag,
td.Fbusiness_deal_id as OId,
CONVERT(VARCHAR, td.Fdeal_gen_time, 112) OrderDate,
tr.Ftrade_buy_num as Qty,
(tr.Ftrade_buy_num*tr.Ftrade_buy_price / 100.00) as OFee,
ISNULL(u.Ficson_uid,0) as UId,
(case when td.Fdeal_source in(2,3,8) then 1969 else td.fsite_id end) as wh_id
from t_deal td
left join t_trade tr on td.Fdeal_id = tr.fdeal_id
left join etl_users..t_user_buyer u on u.Fwg_uid=td.Fbuyer_id
where td.Fdeal_gen_time >= '20140820' AND td.Fdeal_gen_time < '20140821' and td.Fdeal_property3 = 64 and td.Fdeal_source not in(2,3,8))t
where SUBSTRING (t.Otag, CHARINDEX('-',OTag)-6, 1)='3'
group by Otag,OId,OrderDate,Qty,UId,wh_id
order by SUM(OFee) desc ,OId

发现有很多炒货商,而炒货商是从外部推广下的单,至于炒货商为什么在外部推广下单,是为了返利。
浙公网安备 33010602011771号