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
nag k
NA
14
2.1k
how to calculate sum for every 5 rows in sql
Nov 29 2014 4:29 AM
hi iam new to sql Database.i have a problem my table is like this
id |name| | amount
---------------------
1 | xyz | 15
2 | xyz | 54
3 | xyz | 787
2 | xyz | 455
3 | hhh | 58
3 | hhh | 789
3 | hhh | 478
3 | hhh | 7855
and i want result like this .
id |name| | amount
---------------------
1 | xyz | 15
2 | xyz | 54
3 | xyz | 787
4 | xyz | 455
-----------
toatal 1311
-----------
5 | hhh | 58
6 | hhh | 789
7 | hhh | 478
8 | hhh | 7855
-----------
toatal 9180
-----------
Reply
Answers (
1
)
Table in SQL
get 1column thrice time on diffrent cond. from same table.