QUERY: SELECT Size.size_order, Size.size_nametrimmed, Size.size_name, Size.size_id FROM Size
JOIN (
SELECT Size.size_id, Size.size_order FROM Size
WHERE Size.size_id IN (
SELECT ps_size_id FROM `ProductSize`
JOIN (
SELECT `Product`.Product_id FROM `Product`
WHERE
1
AND Product.Product_Brands_id=1458 AND Product.level_0=1
) AS `subjoin` ON `subjoin`.Product_id = `ProductSize`.ps_product_id
)
GROUP BY Size.size_id ASC
) AS subjoin_size ON subjoin_size.size_id = Size.size_id
WHERE 1
AND Size.size_main=1
;;
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC
) AS subjoin_size ON subjoin_size.size_id = Size.size_id
WHERE 1
AND Size' at line 17