I'm getting an error from my SQL query:
SELECT TOP 20 * FROM
(
SELECT DISTINCT
p.ItemGroupName, p.Varenummer, s.EAN, s.inventoryQuantity
FROM
ShopInventory s, ProductData p
WHERE s.EAN = p.EAN
)
ORDER BY cast(inventoryQuantity AS int) DESC
ERROR: 'Incorrect syntax near the keyword 'ORDER'.'