Please provide complete requirements
Provide me table structure
And sample output
If you have any files, zip and upload to www.wikisend.com and paste download link here.
Provide me table structure also with data
Provide me table name and column names.
When do you need it?
For the data provided, output for project(###) ###-####should be 3000 for project revenue and 5000 for ytd?
My apologies, I am out of ideas and opting out for other Professionals to answer. Please wait. You will be notified by email as soon as any Professional joins you.
Thank you for your patience.
Hi there, my name is***** need a "GROUP BY" to get a subtotal. Try adding this after the last FROM statement and before the last WHERE statement:
GROUP BY PSN.Period
OK, hold on one second
Do you have a separate Year field or is it just part of the PSN.Period?
You need to add another subquery to get the YTD, just a moment please.
, (SELECT SUM(PSN.Revenue) FROM PRSummaryMain PR2 WHERE PR2.Period <= PSN.Period AND PR2.WBS1 = PSM.WBS1 and PR2.WBS2 = PSM.WBS2 AND PR2.WBS3 = PSM.WBS3) AS YTD,
I think that will do it, do you understand the intent? I'm not certain of the related fields but if you understand the intent, you'll be able to change that if you need to.
Hey there, I was just checking back with you to see if this worked.
If this solved your issue, can you please accept my answer or I won't get paid anything for helping you. If not, please chat me back and I'll get you the right command for your query. Thanks!