Hi All,
I am having a schema like ARMS. In this schema i am having lot of tables. By using DBA_SEGMENTS i need to get the table size of 'account' table with is country wise.
SELECT SEGMENT_NAME,PARTITION_NAME,SUM(bytes/1024/1024/1024) GB FROM DBA_SEGMENTS
WHERE SEGMENT_NAME = 'ACCOUNT' AND OWNER = 'MATRIX'
GROUP BY SEGMENT_NAME,PARTITION_NAME;
SEGMENT_NAME PARTITION_NAME GB
ACCOUNT S_TOM_IN_ACCT_TAB4 2.000061
ACCOUNT S_TOM_PH_ACCT_TAB3 3.000061
ACCOUNT S_TOM_SG_ACCT_TAB4 5.091055
ACCOUNT S_TOM_SG_ACCT_TAB5 1.379031
ACCOUNT S_TOM_HK_ACCT_TAB1 1.000345
ACCOUNT S_TOM_HK_ACCT_TAB4 1.010006
ACCOUNT S_TOM_IN_ACCT_TAB1 0.300061
ACCOUNT S_TOM_PH_ACCT_TAB4 2.030045
ACCOUNT S_TOM_HK_ACCT_TAB2 2.000061
ACCOUNT S_TOM_IN_ACCT_TAB5 2.305358
Required output:
I need to get the sum size for each country.
SEGMENT_NAME COUNTRY_CODE GB
ACCOUNT SG 6.470086
ACCOUNT PH 5.030106
ACCOUNT HK 4.010412
ACCOUNT IN 4.60548
Regards,
Pradeep D.