Sql query with count
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
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 21, 2013, 11:34 PM EST
You figured showing some odd requirement. Please elaborate it. from figure we can judge your excat requirement.
By the way you can get count, by using following query.
select cast(Age as varchar) + ':' + cast(COUNT(*) as varchar) from #temp
group by Age
please replace #temp with original table name.