Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 group by

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-02-26 : 14:23:44
if i do a groupby query -- is there anyway i can see a field with what it is grouped by

meaning if i have a query

select count(id) from customers group by date,site

I don't want to just see a list of counts but I want to know the count for each date/site



SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-26 : 14:32:14
select date,site, count(id) from customers group by date,site


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -