• Something like this...

    Select NIN_CODE,Count(*) as Cnt from (

    select distinct OO.ORDER_NUMBER, OO.NIN_CODE

    from Table as OO

    WHERE (OO.SUBMITTED_DATE BETWEEN '20090101' AND '20091231')

    AND (OO.TICKET_NUMBER IS NOT NULL) and OO.NIN_CODE='990685711' or OO.NIN_CODE='993435940'

    ) Main

    group by NIN_CODE

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]