4 Replies Latest reply: May 23, 2012 3:30 PM by gerardo.pauza RSS

    count if issue

      Hi everyone,

           i will be pleased if someone can help me with this:

       

      table 1:

       

      city
      mail
      1m@m.com
      2m@m.com
      2n@n.com
      3m@m.com
      4o@o.com
      1o@o.com
      1y@y.com

       

      Straight Table i need:

       

      city
      quantity
      12
      21
      31
      41

       

      the procedure is this:

       

      city = 1 has m@m.com mail and this mail olso is in city = 2 and 3, so 1

      and city = 1 has o@o.com mail and this mail olso is in city = 4, so 1

      but city = 1 has y@y.com mail and this mail only is in city = 1, so 0

       

      then quantity => 1 + 1 + 0 = 2

       

      thanks

      gerardo