aggregate functions

  • I need average a field, but I don't want to include ceros or nulls.

    I tried with sum() and count() but I can't discriminate ceros on the count() function. Do you Have idea?(

  • DO a case in you count and sum like so

     

    (CASE WHEN column = 0 THEN null ELSE value END)

     

    By changing to a null the agregate will eliminate the nulls.

Viewing 2 posts - 1 through 2 (of 2 total)

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