SELECT a.ID, CONCAT(i.name, " [", i.itemCode, "]") as item, `a`.`customerName`, `a`.`attention`, `a`.`phoneNumber1`, `c`.`fldname`, `d`.`fldcountry`, sum(b.totalAmount * exchangeRate) as customerTotal
FROM (`customer` a)
LEFT JOIN `comp_sales_order` b ON `b`.`customerID` = `a`.`ID` AND b.salesOrderDate >=2016-02-01 AND b.salesOrderDate >=2016-02-29
LEFT JOIN `comp_sales_detail` e ON `e`.`salesID` = `b`.`ID`
LEFT JOIN `item` i ON `i`.`id` = `e`.`itemID`
JOIN `_ref_state` c ON `c`.`fldid` = `a`.`customerStateID`
JOIN `_ref_country` d ON `d`.`fldid` = `a`.`customerCountryID`
WHERE `a`.`companyID` =  '3'
GROUP BY `a`.`customerName`
ORDER BY `a`.`customerName`