Subversion Repositories SmartDukaan

Rev

Rev 2857 | Rev 3265 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2857 Rev 3221
Line 159... Line 159...
159
o.status 'order_status', o.total_amount, 
159
o.status 'order_status', o.total_amount, 
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
pa.value 'payment_method', t.coupon_code, t.session_source, 
162
pa.value 'payment_method', t.coupon_code, t.session_source, 
163
case when datediff(t.session_start_time, '20101231') > 0 then datediff(t.session_start_time, '20101231') else 1 end as session_start_date_id, 
163
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
hour(t.session_start_time) as session_start_hour 
164
hour(t.session_start_time) as session_start_hour, aff.name aff_name
165
FROM `order` o 
165
FROM `order` o 
166
left join lineitem l on(o.id = l.order_id ) 
166
left join lineitem l on(o.id = l.order_id ) 
167
left join payment.payment p on (o.transaction_id = p.merchantTxnId) 
167
left join payment.payment p on (o.transaction_id = p.merchantTxnId) 
168
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod')
168
left join payment.paymentattribute pa on (p.id = pa.payment_id and pa.name = 'payMethod')
169
left join transaction t on (o.transaction_id = t.id)
169
left join transaction t on (o.transaction_id = t.id)
-
 
170
left join user.tracklog tl on (tl.data like concat(convert(p.id, char), '%')) 
-
 
171
left join user.affiliate aff on (tl.affiliate_id = aff.id)
170
group by order_id</sql>
172
group by order_id</sql>
171
    <limit>0</limit>
173
    <limit>0</limit>
172
    <lookup/>
174
    <lookup/>
173
    <execute_each_row>N</execute_each_row>
175
    <execute_each_row>N</execute_each_row>
174
    <variables_active>N</variables_active>
176
    <variables_active>N</variables_active>
Line 237... Line 239...
237
        <precision>-2</precision>
239
        <precision>-2</precision>
238
      </field>      <field>        <name>payment_method</name>
240
      </field>      <field>        <name>payment_method</name>
239
        <rename/>
241
        <rename/>
240
        <length>-2</length>
242
        <length>-2</length>
241
        <precision>-2</precision>
243
        <precision>-2</precision>
242
      </field>      <field>        <name>customer_pincode</name>
-
 
243
        <rename>pincode</rename>
-
 
244
        <length>-2</length>
-
 
245
        <precision>-2</precision>
-
 
246
      </field>      <field>        <name>order_status</name>
-
 
247
        <rename>status</rename>
-
 
248
        <length>-2</length>
-
 
249
        <precision>-2</precision>
-
 
250
      </field>      <field>        <name>coupon_code</name>
244
      </field>      <field>        <name>coupon_code</name>
251
        <rename/>
245
        <rename/>
252
        <length>-2</length>
246
        <length>-2</length>
253
        <precision>-2</precision>
247
        <precision>-2</precision>
254
      </field>      <field>        <name>session_source</name>
248
      </field>      <field>        <name>session_source</name>
Line 261... Line 255...
261
        <precision>-2</precision>
255
        <precision>-2</precision>
262
      </field>      <field>        <name>session_start_hour</name>
256
      </field>      <field>        <name>session_start_hour</name>
263
        <rename/>
257
        <rename/>
264
        <length>-2</length>
258
        <length>-2</length>
265
        <precision>-2</precision>
259
        <precision>-2</precision>
-
 
260
      </field>      <field>        <name>customer_pincode</name>
-
 
261
        <rename>pincode</rename>
-
 
262
        <length>-2</length>
-
 
263
        <precision>-2</precision>
-
 
264
      </field>      <field>        <name>order_status</name>
-
 
265
        <rename>status</rename>
-
 
266
        <length>-2</length>
-
 
267
        <precision>-2</precision>
-
 
268
      </field>      <field>        <name>aff_name</name>
-
 
269
        <rename/>
-
 
270
        <length>-2</length>
-
 
271
        <precision>-2</precision>
266
      </field>        <select_unspecified>N</select_unspecified>
272
      </field>        <select_unspecified>N</select_unspecified>
267
    </fields>     <cluster_schema/>
273
    </fields>     <cluster_schema/>
268
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
274
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
269
      <xloc>371</xloc>
275
      <xloc>371</xloc>
270
      <yloc>160</yloc>
276
      <yloc>160</yloc>