You are here: SQL Counting number of non-distinct rows? « MsSQL Server « IT news, forums, messages
SQL Counting number of non-distinct rows?

Posted by David on 05/03/06 19:17

Hi, I have a table that for ease has this data in:

R1, R2, R....z
---------------------
A | 12
A | 22
A | 30
B | 0
B | -1
B | -3
C | 100

I want to generate a table for each distinct row in R1, gives a count
of all the rows with data corresponding

For the above table I would get

A | 3
B | 3
C | 1

Im probably being stupid but cannot see this at the moment... please
help.

Thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация