Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Aggregration

jvjmohanMay 14 2014 — edited May 15 2014

Hi All,

In our DB we have multiple tables say T1, T2 each have diff no. of columns T1 (A,B) and T2 (X,Y,Z) in each.

Each columns have 3 types of data 1,0 and any other number. I need the count of all 0,1 in all tables.

T1

-----

A B

0 1

1 0

0 x

1 1

T2

------

X Y Z

1 0 1

1 1 X

0 0 0

X X 1

1 1 1

Output should be

        0 1

T1 A 2  2

T1 B 1  2

T2 X  1  3

T2 Y 2  2

T2 3 1  3

MOST important, each table will have millions of records and we have query the table only once.

If any more information please let me know.

Thanks,

Vijay

This post has been answered by Frank Kulash on May 14 2014
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 12 2014
Added on May 14 2014
3 comments
210 views