Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. SELECT trunc(CREATED_ON) as creation2016 , COUNT(CREATED_ON)
  2. FROM DS_HD_ISSUE_LIST_2017
  3. WHERE CREATED_ON BETWEEN '01.10.2015' AND sysdate - INTERVAL '1' year
  4. GROUP BY trunc(CREATED_ON)
  5. ORDER BY trunc(CREATED_ON);
  6.  
  7. SELECT trunc(CREATED_ON) as creation2017 , COUNT(CREATED_ON)
  8. FROM DS_HD_ISSUE_LIST_2017
  9. WHERE CREATED_ON BETWEEN '01.10.2016' AND sysdate
  10. GROUP BY trunc(CREATED_ON)
  11. ORDER BY trunc(CREATED_ON);
  12.  
  13.  
  14. SELECT trunc(CREATED_ON) as creation2017 , COUNT(CREATED_ON), trunc(CREATED_ON) as creation2017, CASE
  15. WHEN CREATED_ON BETWEEN '01.10.2016' AND sysdate - INTERVAL '1' year THEN COUNT(CREATED_ON)
  16. END
  17. FROM DS_HD_ISSUE_LIST_2017
  18. WHERE CREATED_ON BETWEEN '01.10.2016' AND sysdate
  19. GROUP BY trunc(CREATED_ON);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement