Difference between revisions of "OE.ACCOUNT MANAGERS (view)"

From dbscript Online Help
Jump to: navigation, search
(New page: == wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''view | OE.ACCOUNT_MANAGERS |- |} <pre> </pre>)
 
Line 7: Line 7:
 
|-
 
|-
 
|}
 
|}
 +
  
 
<pre>
 
<pre>
 
+
CREATE OR REPLACE SELECT          c.account_mgr_id                ACCT_MGR,
 +
                cr.region_id                    REGION,
 +
                c.cust_address.country_id      COUNTRY,
 +
                c.cust_address.state_province  PROVINCE,
 +
                count(*)                        NUM_CUSTOMERS
 +
FROM            customers c, countries cr
 +
WHERE          c.cust_address.country_id = cr.country_id
 +
GROUP BY ROLLUP (c.account_mgr_id,
 +
                cr.region_id,
 +
                c.cust_address.country_id,
 +
                c.cust_address.state_province)
 
</pre>
 
</pre>

Revision as of 20:02, 24 August 2009

wikibot

view OE.ACCOUNT_MANAGERS


CREATE OR REPLACE SELECT          c.account_mgr_id                ACCT_MGR,
                cr.region_id                    REGION,
                c.cust_address.country_id       COUNTRY,
                c.cust_address.state_province   PROVINCE,
                count(*)                        NUM_CUSTOMERS
FROM            customers c, countries cr
WHERE           c.cust_address.country_id = cr.country_id
GROUP BY ROLLUP (c.account_mgr_id,
                 cr.region_id,
                 c.cust_address.country_id,
                 c.cust_address.state_province)