micci73
09-18-2006, 04:43 PM
hi all,
i did a search and didn't find what i was looking for, so don't think this is a duplicate post.
i want to subtract the counts of two statements. example:
statement 1:
select count (done) from mytable where user_id = 1 and done = 1
statement 2:
select count (maintained) from mytable where user_id = 1 and maintained = 1
so, what i really want as a result is statement 1 - statement 2, but i've tried several different ways and all if i don't get an error, then i get an answer of 0. any suggestions?
thanks,
micci
i did a search and didn't find what i was looking for, so don't think this is a duplicate post.
i want to subtract the counts of two statements. example:
statement 1:
select count (done) from mytable where user_id = 1 and done = 1
statement 2:
select count (maintained) from mytable where user_id = 1 and maintained = 1
so, what i really want as a result is statement 1 - statement 2, but i've tried several different ways and all if i don't get an error, then i get an answer of 0. any suggestions?
thanks,
micci