我有一张桌子,三列是这样的:
SELECT * FROM table1 WHERE status="ok"
# Result 1
/*--------------------------------------------
qnt name status
10 prod1 ok
10 prod2 ok
--------------------------------------------*/
SELECT * FROM table1 WHERE status="deleted"
# Result 2
/*--------------------------------------------
qnt name status
2 prod1 deleted
3 prod2 deleted
--------------------------------------------*/
我想要这样的结果(有可能吗?):
# Result3 = (Result 1) - (Result 2)
/*--------------------------------------------
qnt name
8 prod1
7 prod2
--------------------------------------------*/