#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    4
    Rep Power
    0

    Query Help - Multiple Values Count and Show Once


    I have a scenario, where client can have more than one Race like below

    ClientId Client Name Client Datebirth Client Race
    100 John, Smith 01/01/1980 White
    100 John, Smith 01/01/1980 AmericanIndian
    101 John, Dose 03/01/1977 Black
    102 Doe, John 01/23/1983 Asian
    102 Doe, John 01/23/1983 White

    I would like to know how to show the client in only one group, for example if client got counted in White then i dont want him to again appear under american indian

    White
    100 John, Smith 01/01/1980
    102 Doe, John 01/23/1983
    Count: 2
    Black
    101 John, Dose 03/01/1977 Black
    Count: 1

    AmericanIndian
    Count: 0

    Asian
    Count: 0


    Appreciate your guidance and feedback

    Thanks
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,026
    Rep Power
    4210
    Originally Posted by Harris00
    I would like to know how to show the client in only one group
    how do you decide which group?
    r937.com | rudy.ca
    please visit Simply SQL and buy my book

IMN logo majestic logo threadwatch logo seochat tools logo