TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Devendra Kumar
NA
517
246.3k
count product in sqlserver use PARTITION BY
Apr 12 2016 6:31 AM
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
Reply
Answers (
1
)
How to use float in SQL for amount
update query in sql server with user session id