Return Records with Count > 2

  • I have no idea of what is unique on your data but this is a start

    Select a.Company, a.Contact, a.CustomerNumber, a.State, a.City From

        Table a

    join

        (

         select CustomerNumber, State 

         from TableA

         group by CustomerNumber, State

         having Count(*) >2 ) SubQ

         on SubQ.CustomerNumber = a.CustomerNumber and  SubQ.state = a.state

     

    hth


    * Noel

  • Thanks Noel.  That makes perfect sense and should work.  I appreciate the help!

  • Cheers!


    * Noel

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply