troubleshooting Question

distribute budget by months/year

Avatar of phpmysqlcoder
phpmysqlcoderFlag for Denmark asked on
MySQL Server
9 Comments1 Solution341 ViewsLast Modified:
I have the following table:

Project  start date             end date        budget
---------  -----------              -------------      ------------
1           2010-01-01         2011-12-31    240
2           2011-06-30         2012-06-30    120

I would like to allocate the budget evenly by YEAR, so the end result would be something like this:

Project  start date       end date             budget       2010    2011    2012
---------  -----------       -------------           ------------   --------  --------  ---------
1           2010-01-01   2011-12-31          240           120       120       0    
2           2011-06-30   2012-06-30          120               0         60     60

Is there a way to achieve this using mysql ?
question.pdf
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros