Hi,
to use aggregate function does it should be with groupby clause.
Thanks.
Aggregate function and grouby clause
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Anil KumarRank #367 · 6.8K reputationPosted May 30, 2012, 5:00 AM EDT
But it depends what you want. For example COUNT is also an aggregate function but you can use it without GROUP BY clause.
MSDN specify it as :
Aggregate functions can be used as expressions only in the following:
The select list of a SELECT statement (either a subquery or an outer query).
A HAVING clause.