{"M0EMBNM":[{"ALterationListID":null,"ID":"10409","IsDefault":"1","GroupItemID":"27","ListID":"181139","Price":"0","ItemAlteration":"Name to Embroider","ProductID":"M0EMBNM-1","CustPrice":null,"AlterationsGroup":null,"GroupName":"M0EMBNM","ParentID":"27","AlterPrice":"0"},{"ALterationListID":null,"ID":"10494","IsDefault":"0","GroupItemID":"27","ListID":"181139","Price":"0","ItemAlteration":"Name To Embroider Line 1","ProductID":"M0EMBNM-1","CustPrice":null,"AlterationsGroup":null,"GroupName":"M0EMBNM-LN2","ParentID":"41","AlterPrice":"0"},{"ALterationListID":null,"ID":"10495","IsDefault":"0","GroupItemID":"27","ListID":"181139","Price":"0","ItemAlteration":"Name To Embroider Line 2","ProductID":"M0EMBNM-1","CustPrice":null,"AlterationsGroup":null,"GroupName":"M0EMBNM-LN2","ParentID":"41","AlterPrice":"0"}}]}
SELECT `I`.`ListID`, `I`.`ProductID`, `I`.`ItemGroup`, `I`.`ItemColorID`, `I`.`ItemColor`, `I`.`ItemSizeOnly` AS `ItemSize`, `I`.`ItemLength`, `I`.`RequiredAlterationID`, `I`.`ProspectItem`,
`I`.`SalesPrice`, `I`.`SalesPriceHS` AS `WebPrice`,
`I`.`AltShowListID`, `I`.`InventoryOnly`
FROM `tbl_items` `I`
LEFT JOIN `tbl_items_comp` `T` ON (`I`.`ItemColorID` = `T`.`ItemColorID`)
WHERE (`I`.`ItemGroup` = '') AND (`I`.`ShowOnlyLocal` = '1') AND (IsActive=1) AND (`I`.`SpecialGroupID` Is Null OR `I`.`SpecialGroupID` = '0') AND (`T`.`CompID` = '2')
GROUP BY `I`.`ListID`
ORDER BY `I`.`ProspectItem`, IFNULL(`I`.`ItemColor`,'ZZZZZZ'),`I`.`SizeSort`,`I`.`ItemSize`, `I`.`ItemLength`