Code:
SELECT trunc(sysdate) dt, count(*) as count FROM ATM_MONITOR.ATM_PROBLEM WHERE trunc(sysdate) = trunc(create_time) union SELECT trunc(sysdate)-1 dt, count(*) as count FROM ATM_MONITOR.ATM_PROBLEM WHERE trunc(sysdate)-1 = trunc(create_time) union SELECT trunc(sysdate)-2 dt, count(*) as count FROM ATM_MONITOR.ATM_PROBLEM WHERE trunc(sysdate)-2 = trunc(create_time)
DT COUNT
--------------------------
19.10.2011 741
18.10.2011 498
17.10.2011 918
How can I get this code in one statment???
Comment