Skip to main content

Posts

Showing posts from August, 2015

Query to find all POs Over a Particular Amount for a Period of time

SELECT   segment1 ,         Sum ( pl . unit_price   *   pl . quantity ) FROM     po_lines_all   pl ,         po_headers_all   ph WHERE    ph . po_header_id   =   pl . po_header_id         AND   ph . creation_date   >   sysdate   -   400 GROUP    BY   segment1 HAVING   Sum ( pl . unit_price   *   pl . quantity )   >=   250000