Hi,
I am just wondering if there is a specific type of syntax required for a subtraction command in Sqlite, as I am trying to subtract values from two different tables. Currently, I have tried this but with no success:
db:exec([[SELECT SUM(incomeValue) FROM income WHERE timeStamp >= "]]..to_date..[[" AND timeStamp <= "]]..now..[[" MINUS SELECT SUM(expenseValue) FROM expense WHERE timeStamp2 >= "]]..to_date..[[" AND timeStamp2 <= "]]..now..[["]]
I was not sure whether to use MINUS, or just the - symbol.
Thanks