• Is this what you're after?

    SELECT COUNT(*) AS Total,

    COUNT(DISTINCT datakey) AS Uniquedatakey,

    COUNT(DISTINCT CASE WHEN landline<>'' THEN landline END) AS Uniquelandline,

    COUNT(DISTINCT CASE WHEN mobile<>'' THEN mobile END) AS Uniquemobile,

    COUNT(DISTINCT CASE WHEN email<>'' THEN email END) AS Uniqueemail

    FROM test

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537