Aggregates in T-SQL

  • Nice easy one.

    The third query is clearly going to give an error, and that eliminates all but two of the options, so it boils down to whether select count(x) from something where x is null can ever deliver anything other than 0; it can't, because count(x) ignores nulls and that leaves only the correct option.

    Tom

  • Good question. Honestly I hadn't cared much about SUMs including NULLs. Great to know this.

    Saludos,

    "El" Jerry.

    "A watt of Ottawa" - Gerardo Galvan

    To better understand your help request, please follow these best practices.[/url]

  • Good question. Catching up on QotD, been on vacation.

  • Good One.

  • Thanks for the query...:-)

    Manik
    You cannot get to the top by sitting on your bottom.

Viewing 5 posts - 16 through 19 (of 19 total)

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