Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1054 - Unknown column 'brand.liquorBrandID' in 'having clause'
- SELECT brand.name, ROUND( (prod.pricePerSku / ( prod.litresPerBottle * prod.bottlePerSku)) , 2) AS pricePerLitre
- FROM WireDen_liquorProduct AS prod, WireDen_liquorBrand AS brand
- GROUP BY prod.category1ID, prod.liquorBrandID
- HAVING prod.liquorBrandID = brand.liquorBrandID
- AND (prod.pricePerSku / ( prod.litresPerBottle * prod.bottlePerSku)) = MAX((prod.pricePerSku / ( prod.litresPerBottle * prod.bottlePerSku)) )
- AND prod.category1ID = 9;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement