select tbl_shape.Shape +' ('+ltrim(str((select COUNT(1) from tbl_Image_Master where tbl_Image_Master.Shape_Id=ShapeId)))+')'
as Shape_Name From dbo.tbl_shape group by tbl_shape.Shape,tbl_shape.shapeId ORDER BY tbl_shape.Shape Asc
this is give output like:
Shape_Name
- Box and Bricks (31)
- Chips (26)
- Coin (19)
- Fancy (11)
but in this result some product name and image same
i want count only one that have same name and image
what it is possible
please solve this query