What I want is Write a SELECT statement that answers this question:
select orderID from order where customer id = @custID and Total cashmovementValue for current order id is less than total (sold quantity * salePrice ) for current order id.
How to do it?
Thanks.