I have two SELECT statements that return a number each, and I’d like to divide one by the other.
Something like the following, if it would work:
SELECT
SELECT
SUM(SIZE)
FROM
GLOBAL_STATS_V_M
WHERE
ID IN ("DuplicatedRule", "OldRule", "RevRule", "TmpRule")
/
SELECT
SUM(SIZE)
FROM
GLOBAL_STATS_V_M
WHERE
ID IN ("Total")
That gets a ‘Query Error: near “SELECT”: syntax error Unable to execute statement’.
Adding parenthesis does not help.
How to do this?
I’m using Sqliteman
You need to add parenthesis: