declare @users table(Id int, Behcode varchar(50), ProductName varchar(50), Classification varchar(50))
insert into @users
select 1, '1111', 'Iron', 'Electric'
union all
select 2, '1111', 'Vacuum Cleaner', 'Electric'
union all
select 3, '1111', 'Sofa', 'Furniture'
union all
select 2, '1112', 'Scarf', 'Cloth'
union all
select 5, '1112', 'Shirt', 'Cloth'
select classification, count(classification) TotalProduct, behcode
from @users
where behcode = '1111'
group by classification, behcode