| Line 45... |
Line 45... |
| 45 |
JOIN datedim d on (d.date_id = s.date_id)
|
45 |
JOIN datedim d on (d.date_id = s.date_id)
|
| 46 |
JOIN orderstatus os on (s.status = os.status)
|
46 |
JOIN orderstatus os on (s.status = os.status)
|
| 47 |
WHERE d.fulldate in (DATE_SUB(curdate(), INTERVAL 1 DAY))
|
47 |
WHERE d.fulldate in (DATE_SUB(curdate(), INTERVAL 1 DAY))
|
| 48 |
AND os.statusGroup in ('Delivered', 'In process', 'Refunded', 'Return in process', 'Unused')
|
48 |
AND os.statusGroup in ('Delivered', 'In process', 'Refunded', 'Return in process', 'Unused')
|
| 49 |
AND i.parent_category = 'Mobile Accessories'
|
49 |
AND i.parent_category = 'Mobile Accessories'
|
| 50 |
AND os.statusSubGroup not in ('Cancellation pending', 'Cod verification pending')
|
50 |
AND os.statusSubGroup not in ('Cancellation pending')
|
| 51 |
GROUP BY i.parent_category, i.category, i.brand, IFNULL(i.model_name, ''), IFNULL(i.model_number, ''), i.color
|
51 |
GROUP BY i.parent_category, i.category, i.brand, IFNULL(i.model_name, ''), IFNULL(i.model_number, ''), i.color
|
| 52 |
ORDER BY i.parent_category, i.brand;
|
52 |
ORDER BY i.parent_category, i.brand;
|
| 53 |
'''
|
53 |
'''
|
| 54 |
|
54 |
|
| 55 |
conn = getDbConnection()
|
55 |
conn = getDbConnection()
|