Hello Everyone

Sqlserver Table1 has following data

Sno---------date---------qty
1-------25/12/2009------5
2-------25/12/2009------4
1-------26/12/2009------8
2-------26/12/2009------3
3-------26/12/2009------2


I want to get following result

Sno---------date---------qty
2-------25/12/2009------9
3-------26/12/2009------13

That is grouping on date.
Column1 =count date
Column2 =date
Column3=sum of qty

What command should I write to get above result

Please help

>What command should I write to get above result

Write SELECT with GROUP BY clause.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.