Hi All - I have the following table:
SKU PRICE
123456 $10
123456 $20
123456 $30
123457 $40
123457 $50
123457 $60
My query to outputs a unique SKU based on the lowest price:
SELECT SKU, MIN(PRICE) FROM TABLE1
GROUP BY SKU
However, I need to perform a calculation on that aggregrate function. If a price is more than $10, it will deduct $10 off it. SQL does not allow calculation on the MIN(PRICE) function. How can I achieve this?
Thanks!