and if you want to get a complete overview:create table #test(transit char(5),[type] varchar(25))insert #testselect '00018', 'Laptop' union allselect '00018', 'Laptop' union allselect '00018', 'Desktop' union allselect '00025', 'Laptop' union allselect '00025', 'Desktop'select transit,[type],count(*) as counterfrom #testgroup by transit,[type]order by transit,[type]-- gives you:-- 00018 Desktop 1-- 00018 Laptop 2-- 00025 Desktop 1-- 00025 Laptop 1drop table #test
Webfred
No, you're never too old to Yak'n'Roll if you're too young to die.