Im very novice at SQL and Access in general and I am having difficulty doing a subquery from a union query. Here is the code I have so far in my union query:
select Phase, [Date], Price
from [Corner Star Tickets]
UNION select Phase, [Date], Price
from [Corner Star Invoices];
*The reason I have [Date] is because nothing else worked and I kept getting syntax errors any time I tried to change the column name.
Ok now for my problem....I have been trying multiple code to Sum the Price from both tables together. I would need to have it sort by phase, group by month, sum totals for grouped month then do a total sum of all months...Does that make sense? If you could supply the code that would be fabulous and make my life much easier (well at least until I move on to the next step)! Thanks
select Phase, [Date], Price
from [Corner Star Tickets]
UNION select Phase, [Date], Price
from [Corner Star Invoices];
*The reason I have [Date] is because nothing else worked and I kept getting syntax errors any time I tried to change the column name.
Ok now for my problem....I have been trying multiple code to Sum the Price from both tables together. I would need to have it sort by phase, group by month, sum totals for grouped month then do a total sum of all months...Does that make sense? If you could supply the code that would be fabulous and make my life much easier (well at least until I move on to the next step)! Thanks