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
Vignesh Kumar
NA
1k
416.6k
Need QUERY HELP
Jun 13 2014 3:16 AM
Hi,
TABLE 1
TotalCost MonthlyCost SharedCost
$ 120 $10 $ 213
$ 240 $20 $ 256
I need to calculate these column like this
sum(TotalCost+1-SharedCost) as PreTotalCost
sum(MonthlyCost-SharedCost) as PostTotalCost
My expected output
TotalCost MonthlyCost SharedCost PreTotalCost PostTotalCost
$ 120 $10 $ 213 $ -92 $ -203
$ 240 $20 $ 256 $ -15 $ -236
Really appreciate any help on this.
Reply
Answers (
5
)
How to Find Only Alphanumeric values from column
sql if else