Cross reference if value1 is equal or lower than value2 and show OK or NOK in another cell

Hello all,

I'm working on a database of our inventory.
I want to see in a dashboard that the actual stock is equal or lower that my minimum stock amount and show only that/those specific items in my dashboard.
Maybe by filtering a seperate column that shows OK or NOK from the database side?

Hey @Mr.Price!

Could something like this be the filter you're looking for?

SELECT * FROM table_name WHERE stock_amount < minimal_stock


Thank you for your reply.
Yes, that was what I'm was looking for.
I was making it to hard for myself by trying something else :smiley:

What I have now is:
Select Column1, Column2, Column4, Column7
from "mytable"
WHERE Column2 = 'Description' and stock_amount <= minimal_stock +5
order by Column1

This works like a charm for me.