2 Replies Latest reply: Nov 14, 2016 2:24 AM by Rima Hajou RSS

    Count of PersonId that have Flag A and B

    Rima Hajou

      Hello,

      I want to know the number of people that have a common A and B as Flags, each person can have multiple As and/or multiple Bs (and also he can have As without B's and vice versa). This table shows some the data:

      PersonID | Flag | Field1 | Field2 | Field3

      12           | A     |

      12           | A     |

      13           | B     |

      14           | B     |

      15           | A     |

      15           | B     |

      16           | B     |

      17           | A     |

      12           | B     |

      12           | A     |


      The result of the count should be 2 because 12 and 15 are the only personID that have records with Flag A and B.


      How to obtain this?