I have two queries that I'm combining with a UNION operation:

```
DECLARE @BeginningOfYear AS date

SET @BeginningOfYear = smalldatetimefromparts(YEAR(GETDATE()), 1, 1, 0, 0)

SELECT

  groupname,
  SUM(CASE WHEN ticketcreateddate > DATEADD(DAY, -7, GETDATE()) THEN 1 ELSE 0 END) AS 'LW',
  SUM(CASE WHEN ticketcreateddate > @BeginningOfYear THEN 1 ELSE 0 END) AS 'YTD',
  CAST(COUNT(*) / DATEDIFF(WEEK, @BeginningOfYear, GETDATE()) AS float) AS 'Average Per Week'

FROM zendeskticketexport

WHERE groupname IN ('DC Web Ops', 'DC Maintenance', 'DC QC1')

GROUP BY groupname

UNION

SELECT

  groupname,
  SUM(CASE WHEN ticketcreateddate > DATEADD(DAY, -7, GETDATE()) THEN 1 ELSE 0 END) AS 'LW',
  SUM(CASE WHEN ticketcreateddate > @BeginningOfYear THEN 1 ELSE 0 END) AS 'YTD',
  CAST(COUNT(*) / DATEDIFF(WEEK, @BeginningOfYear, GETDATE()) AS float) AS 'Average Per Week'

FROM zendeskunclosedticketexport

WHERE groupname IN ('DC Web Ops', 'DC Maintenance', 'DC QC1')

GROUP BY groupname

```

The result of this query:

```
groupname       LW      YTD     Average Per Week
DC Maintenance  179     1831    184
DC QC1          85      647     64
DC Web Ops      69      400     40
DC Maintenance  68      86      8
DC QC1          18      20      2
DC Web Ops      53      80      8

```

I would like to sum up the numbers for each of the groups in the resulting queries, but I don't know how to do this without creating a temporary table...I would like to avoid doing so because I feel it would be an unnecessary complication to the query. I'm thinking on doing on rather doing a full join...would that be more appropriate or is a temp table the way to go on this one?

EDIT: I should mention there's a unique identifier on both of the tables - let's call it ID - but if one ID exists on a table, it doesn't exist on the other - this is the reason why I'm thinking a FULL join might be appropriate.