davidj.org

home ~ tools ~ song quotes ~ podcast ~ song lyric trivia ~ docs ~ links ~ archives ~ search ~ lycii ~ mail
internetbumperstickers.com

Number of Distinct Values in a Table

I was able to use T-SQL to find out how often a distinct value appears in a table.

Select valuename, count(*) 'numTimes' from tablename group by valuename order by numTimes desc

Remember to replace the reddish words with your values!

Submitted by - David Johnson