Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Need Help For Grouping the Rows
Krishna Kumar
Apr 18 2017 2:21 AM
240
Reply
Dear all,
I have a table like below
date bill_desc amount
17-04-2017 RoomCharge 250.00
17-04-2017 BreakFast 80.00
17-04-2017 ExtraBed 120.00
17-04-2017 WaterBottle 30.00
Noe I want to sum the amount of Roomchage and description and display it as RoomCharge and remaining chrges are ther to be displayed.
date bill_desc amount
17-04-2017 RoomCharge 330.00 (RoomCharge + Breakfast)
17-04-2017 ExtraBed 120.00
17-04-2017 WaterBottle 30.00
I need to group the data by date.. can anyone help me to acheive this. I have an idea that this will be acheived by case statement, But i dont know how to prepare that or you can suggest me the other method
Thank You in Advance
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Database Diagram
shop booking management system erd