Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. SELECT
  2. order_no
  3. , po_order_no
  4. , interface
  5. , count (*) amount
  6. , issue
  7. FROM
  8. (
  9. SELECT
  10. case
  11. when interface = 'LRD_POL'
  12. then order_no||''
  13. else po_order_no||''
  14. end selected_order_no,
  15. order_no,
  16. po_order_no,
  17. interface,
  18. issue
  19. FROM
  20. ifs_healthy_check_issues
  21. WHERE
  22. approved = 'N'
  23. )
  24. GROUP BY order_no, po_order_no, issue, order_no, interface
  25. ORDER BY selected_order_no, interface, amount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement