Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Get counts and list them

    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.
    Last edited by shaikhnavid14; 11-06-12 at 04:42. Reason: added note.

  2. #2
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    487
    Suggest you show some "inpput" and the output you want when this code is run.

    Your sample data needs to include data the meets all of your various criteria.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •