2 Replies Latest reply: Nov 23, 2013 5:51 AM by Priyasagi RSS

    need to find total incoming and outgoing calls

    986570

      Hello Sir,

       

      having 2 tables

      a)  circuit

           ckto primary key

           statusid

       

      b) logs

      cktno foreign key references circuit(cktno)

      calltype

       

      1. circuit:

      cktno  statusid

      0          0

      1          1

      2          0

      3          0

       

      2. logs

      ckto   calltype 

      1          in

      2          out

      3          in

      0          out

      1           in

      1           out

      3           out

       

      output required :

       

      cktno     statusid     count( in)      count( out)

      0              0                   0               1

      1              1                   2               1

      2              0                    0               1

      3              0                    1               1

       

      Kindly help.