Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Get counts and list them

$
0
0
I have tables symbols and rpm.
rpm exports symbols and consumes as well.
symbol table is a collection of all symbols(exported and imported).
symbols table have id, name, rpm_id (maps to id of rpm table) , flag to show whether it is exported or imported.
rpm table is having id, name.
I want to list exported symbols by a rpm(given its id; say 35) and for each symbol I want to get the count specifying number of times it is consumed.

flag = 1; consumed
flag = 0;exported

output layout:
rpm_name | symbol_name | count(number of time this symbol is consumed overall)

please suggest some way to get the result:

Note: a symbol, which is exported by a rpm, can be used by multiple times by other rpms.

Viewing all articles
Browse latest Browse all 13329

Trending Articles