| Line 160... |
Line 160... |
| 160 |
datediff(o.created_timestamp, '20101231') as date_id, hour(o.created_timestamp) as order_hour,
|
160 |
datediff(o.created_timestamp, '20101231') as date_id, hour(o.created_timestamp) as order_hour,
|
| 161 |
o.transaction_id, l.item_id, l.quantity, l.unit_price, l.transfer_price, p.gatewayId,
|
161 |
o.transaction_id, l.item_id, l.quantity, l.unit_price, l.transfer_price, p.gatewayId,
|
| 162 |
case when pa.value is null then case when p.gatewayId = 1 then 2099 when p.gatewayId = 2 then 1099 else null end else pa.value end 'payment_method',
|
162 |
case when pa.value is null then case when p.gatewayId = 1 then 2099 when p.gatewayId = 2 then 1099 else null end else pa.value end 'payment_method',
|
| 163 |
t.coupon_code, t.session_source,
|
163 |
t.coupon_code, t.session_source,
|
| 164 |
case when datediff(t.session_start_time, '20101231') > 0 then datediff(t.session_start_time, '20101231') else 1 end as session_start_date_id,
|
164 |
case when datediff(t.session_start_time, '20101231') > 0 then datediff(t.session_start_time, '20101231') else 1 end as session_start_date_id,
|
| - |
|
165 |
case when datediff(u.source_start_time, '20101231') > 0 then datediff(u.source_start_time, '20101231') else 1 end as first_source_start_date_id,
|
| 165 |
hour(t.session_start_time) as session_start_hour, aff.name aff_name
|
166 |
hour(t.session_start_time) as session_start_hour, aff.name aff_name
|
| 166 |
FROM `order` o
|
167 |
FROM `order` o
|
| 167 |
left join lineitem l on(o.id = l.order_id )
|
168 |
left join lineitem l on(o.id = l.order_id )
|
| 168 |
left join (select * from payment.payment order by id desc) p on (o.transaction_id = p.merchantTxnId)
|
169 |
left join (select * from payment.payment order by id desc) p on (o.transaction_id = p.merchantTxnId)
|
| 169 |
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod')
|
170 |
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod')
|
| 170 |
left join transaction t on (o.transaction_id = t.id)
|
171 |
left join transaction t on (o.transaction_id = t.id)
|
| 171 |
left join user.tracklog tl on (tl.data like concat(convert(p.id, char), '%'))
|
172 |
left join user.tracklog tl on (tl.data like concat(convert(p.id, char), '%'))
|
| - |
|
173 |
left join user.user u on (u.id = o.customer_id)
|
| 172 |
left join user.affiliate aff on (tl.affiliate_id = aff.id)
|
174 |
left join user.affiliate aff on (tl.affiliate_id = aff.id)
|
| 173 |
group by order_id</sql>
|
175 |
group by order_id</sql>
|
| 174 |
<limit>0</limit>
|
176 |
<limit>0</limit>
|
| 175 |
<lookup/>
|
177 |
<lookup/>
|
| 176 |
<execute_each_row>N</execute_each_row>
|
178 |
<execute_each_row>N</execute_each_row>
|
| Line 268... |
Line 270... |
| 268 |
<precision>-2</precision>
|
270 |
<precision>-2</precision>
|
| 269 |
</field> <field> <name>aff_name</name>
|
271 |
</field> <field> <name>aff_name</name>
|
| 270 |
<rename/>
|
272 |
<rename/>
|
| 271 |
<length>-2</length>
|
273 |
<length>-2</length>
|
| 272 |
<precision>-2</precision>
|
274 |
<precision>-2</precision>
|
| - |
|
275 |
</field> <field> <name>first_source_start_date_id</name>
|
| - |
|
276 |
<rename/>
|
| - |
|
277 |
<length>-2</length>
|
| - |
|
278 |
<precision>-2</precision>
|
| 273 |
</field> <select_unspecified>N</select_unspecified>
|
279 |
</field> <select_unspecified>N</select_unspecified>
|
| 274 |
</fields> <cluster_schema/>
|
280 |
</fields> <cluster_schema/>
|
| 275 |
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
|
281 |
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
|
| 276 |
<xloc>371</xloc>
|
282 |
<xloc>371</xloc>
|
| 277 |
<yloc>160</yloc>
|
283 |
<yloc>160</yloc>
|