DBA Data[Home] [Help]

VIEW: APPS.IMC_COUNTRY_PER_CHART_V

Source

View Text - Preformatted

SELECT territory_short_name Territory, a.country, a.customers from (select country, count(*) customers from hz_parties WHERE party_type='PERSON' group by country) a, fnd_territories_vl fnd where fnd.territory_code (+) = a.country order by a.customers desc
View Text - HTML Formatted

SELECT TERRITORY_SHORT_NAME TERRITORY
, A.COUNTRY
, A.CUSTOMERS
FROM (SELECT COUNTRY
, COUNT(*) CUSTOMERS
FROM HZ_PARTIES
WHERE PARTY_TYPE='PERSON' GROUP BY COUNTRY) A
, FND_TERRITORIES_VL FND
WHERE FND.TERRITORY_CODE (+) = A.COUNTRY ORDER BY A.CUSTOMERS DESC