I've got table with following columns and data:
stock quant
----- -----
10 0
10 -5
10 1
1 20
10 1
10 88
5 1
What I need is to exclude rows with stock_status = 10 and quantity <= 0 at the same time.
I need to have those rows with stock_status = 10 but quantity > 0 or the other way around.
So the desire output from this would be
stock quant
---- ---
10 1
1 20
10 1
10 88
5 1
Thanks.
HAVINGand now im thinking about usingCASE. It should be something like SELECT * FROM table WHERE stock != 10 (AND AT THE SAME TIME) quant <= 0filteringand in SQL you do it throughWHEREcondition. so add a conditionWHERE quantity > 0