QUERY = SELECT discounted_groups, group_discount, CubeCart_cats_idx.cat_id, CubeCart_inventory.siteAbbrev, CubeCart_inventory.sourceSite, CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel, hasVideo FROM CubeCart_cats_idx INNER JOIN CubeCart_inventory ON CubeCart_cats_idx.productId = CubeCart_inventory.productId LEFT JOIN CubeCart_category ON CubeCart_cats_idx.cat_id = CubeCart_category.cat_id WHERE hidden!='yes' and hidden_cat!='yes' and CubeCart_cats_idx.cat_id IN (17) GROUP BY CubeCart_cats_idx.productId