CONCAT(address.firstname,' ',
address.lastname) AS `Name`,
address.email AS Email,
items.created_at AS Date,
items.`name` AS Description,
items.store_id AS Logon,
items.`name` AS Category,
items.store_id AS FeedbackDate,
items.sku AS ProductSearchcode,
items.order_id AS Orderref,
orders.grand_total
FROM sales_flat_order AS orders
JOIN sales_flat_order_item AS items
ON items.order_id = orders.entity_id
LEFT JOIN sales_flat_order_address AS address
ON orders.entity_id = address.parent_id
WHERE
items .created_at BETWEEN '2016-07-01' AND '2016-07-31'
AND orders.status = 'complete'
SOCIALIZE IT →