\$query: SELECT i.items_id,
i.items_name,
i.items_description,
SUM(inv.inventory_quantity),
inv.inventory_delivery,
MAX(inv.inventory_price),
im.images_path
FROM items i, images im, inventory inv, sorts s WHERE (i.items_id = inv.inventory_items_id AND i.items_visibility = 1 AND i.items_images_id = im.images_id AND (s.sorts_id ="105" OR s.sorts_id ="105" OR s.sorts_id ="1" OR s.sorts_id ="183" OR s.sorts_id ="184" OR s.sorts_id ="3" OR s.sorts_id ="217" OR s.sorts_id ="448" OR s.sorts_id ="449") AND s.sorts_id = i.items_sorts_id) GROUP BY i.items_id ORDER BY MAX(inv.inventory_price)