| Line 165... |
Line 165... |
| 165 |
t.coupon_code,
|
165 |
t.coupon_code,
|
| 166 |
case when t.session_source is null then 'Unknown' when t.session_source like 'DIRECT%' then 'Direct' when t.session_source like 'ORGANIC%' then 'Organic' when t.session_source like 'PAID%' then 'Paid' else 'Referer' end as session_source_type,
|
166 |
case when t.session_source is null then 'Unknown' when t.session_source like 'DIRECT%' then 'Direct' when t.session_source like 'ORGANIC%' then 'Organic' when t.session_source like 'PAID%' then 'Paid' else 'Referer' end as session_source_type,
|
| 167 |
SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(t.session_source,'://',-1),'/',1),'www.',-1) as session_source_url,
|
167 |
SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(t.session_source,'://',-1),'/',1),'www.',-1) as session_source_url,
|
| 168 |
case when datediff(t.session_start_time, u.source_start_time) > 30 then 0 when datediff(t.session_start_time, u.source_start_time) > 15 then 1
|
168 |
case when datediff(t.session_start_time, u.source_start_time) > 30 then 0 when datediff(t.session_start_time, u.source_start_time) > 15 then 1
|
| 169 |
when datediff(t.session_start_time, u.source_start_time) > 7 then 2 when datediff(t.session_start_time, u.source_start_time) > 2 then 3
|
169 |
when datediff(t.session_start_time, u.source_start_time) > 7 then 2 when datediff(t.session_start_time, u.source_start_time) > 2 then 3
|
| 170 |
when datediff(t.session_start_time, u.source_start_time) > 1 then 4 else 5 as days_to_purchase,
|
170 |
when datediff(t.session_start_time, u.source_start_time) > 1 then 4 else 5 end as days_to_purchase,
|
| 171 |
aff.name aff_name
|
171 |
aff.name aff_name
|
| 172 |
FROM `order` o
|
172 |
FROM `order` o
|
| 173 |
left join lineitem l on(o.id = l.order_id )
|
173 |
left join lineitem l on(o.id = l.order_id )
|
| 174 |
left join (select * from payment.payment order by id desc) p on (o.transaction_id = p.merchantTxnId)
|
174 |
left join (select * from payment.payment order by id desc) p on (o.transaction_id = p.merchantTxnId)
|
| 175 |
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod')
|
175 |
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod')
|
| Line 184... |
Line 184... |
| 184 |
<variables_active>N</variables_active>
|
184 |
<variables_active>N</variables_active>
|
| 185 |
<lazy_conversion_active>N</lazy_conversion_active>
|
185 |
<lazy_conversion_active>N</lazy_conversion_active>
|
| 186 |
<cluster_schema/>
|
186 |
<cluster_schema/>
|
| 187 |
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
|
187 |
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
|
| 188 |
<xloc>133</xloc>
|
188 |
<xloc>133</xloc>
|
| 189 |
<yloc>160</yloc>
|
189 |
<yloc>162</yloc>
|
| 190 |
<draw>Y</draw>
|
190 |
<draw>Y</draw>
|
| 191 |
</GUI>
|
191 |
</GUI>
|
| 192 |
</step>
|
192 |
</step>
|
| 193 |
|
193 |
|
| 194 |
<step>
|
194 |
<step>
|