• sharonsql2013 (12/6/2013)


    I am trying to get the average for number of Ids per day

    But , some how I get "0".

    Can anyone suggest

    It giving zero because there might be not data matching against the join you are using, try to change the query to the inner join to check if there any results you find, 2ndly there is not need to CTE, desire result can be achieve through a simple query.