Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
count product in sqlserver use PARTITION BY
Devendra Kumar
Apr 12 2016 6:31 AM
294
Reply
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
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to use float in SQL for amount
update query in sql server with user session id