Belum diuji tetapi harus berfungsi:
SELECT
(SELECT value from table where date between DATE1 and DATE2) -
(SELECT value from table where date between DATE3 and DATE4)
FROM dual;
Dengan asumsi bahwa SELECT value
. Anda dijamin mengembalikan satu nilai