I need to do a conditional select that checks a sum done this way:
select round(sum(('gin'.'Caixa_9L' / 1000)),1) AS 'total' from 'gin'
If this sum above is = 0, I need to get a value from one field in another table (called an asterisk) and display as total.
I'm starting in sql and I'm having a bit of trouble defining this logic.