count product by shape:
use this query:
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
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Khan Abrar AhmedPosted Apr 14, 2016, 8:41 AM