Hello all-
Thank you for reviewing my Advanced Editor SQL Question. I have two queries that work alone by themselves. I want to add or subtract these numbers together. Here is an image of each result along with the SQL that is generated.
I would like to Add or Sum the results of Query 1 with the results of Query 2 to get one end result
I would like one record that returns -3003
i.e. -3039+36 = -3003
QUERY #1 :
Prior Year Headcount *-1 :

SQL GENERATED IN ADVANCED EDITOR:
SET VARIABLE PREFERRED_CURRENCY='Local Currency',PREFERRED_CURRENCY='Local Currency'; SELECT CAST(COUNT(PYHC.s_1) AS INTEGER)*-1 saw_0 FROM (SELECT 0 s_0, "Human Resources - Workforce Deployment"."Basic Information"."Person Number" s_1, "Human Resources - Workforce Deployment"."Department Hierarchy"."SUBLOB Name" s_2, '1. 2018 YEAR END HC' s_3, DESCRIPTOR_IDOF("Human Resources - Workforce Deployment"."Department Hierarchy"."SUBLOB Name") s_4, REPORT_COUNT("Human Resources - Workforce Deployment"."Basic Information"."Person Number" BY ) s_5, REPORT_COUNT("Human Resources - Workforce Deployment"."Basic Information"."Person Number" BY DESCRIPTOR_IDOF("Human Resources - Workforce Deployment"."Department Hierarchy"."SUBLOB Name")) s_6FROM "Human Resources - Workforce Deployment"WHERE(("Workforce Deployment Facts"."Employee Headcount" > 0) AND (DESCRIPTOR_IDOF("Human Resources - Workforce Deployment"."Department Hierarchy"."LOB Name") = '300000015389973') AND ("Pay Grade"."Pay Grade Name" <> 'DEV') AND ((cast(substring("Gregorian Calendar"."Month Name" from 8 for 2) as integer) = 12) AND (cast("Gregorian Calendar"."Year" as integer) = case when (cast(substring(Valueof("CURRENT_MONTH") from 8 for 2) as integer)-1) = 0 then (cast(valueof("CURRENT_YEAR") as integer) -2 ) else (cast(valueof("CURRENT_YEAR") as integer) -1 ) end)))ORDER BY 4 ASC NULLS LAST, 3 ASC NULLS LAST, 5 ASC NULLS LAST, 2 ASC NULLS LAST) PYHC
QUERY #2 :
Terminations:

SQL GENERATED IN ADVANCED EDITOR:
SET VARIABLE PREFERRED_CURRENCY='Local Currency',PREFERRED_CURRENCY='Local Currency'; SELECT COUNT(TERMS.s_1) saw_0 FROM (SELECT 0 s_0, "Human Resources - Workforce Deployment"."Basic Information"."Person Number" s_1, "Human Resources - Workforce Deployment"."Department Hierarchy"."SUBLOB Name" s_2, '2. YTD Terminations' s_3, DESCRIPTOR_IDOF("Human Resources - Workforce Deployment"."Department Hierarchy"."SUBLOB Name") s_4, REPORT_COUNT("Human Resources - Workforce Deployment"."Basic Information"."Person Number" BY ) s_5, REPORT_COUNT("Human Resources - Workforce Deployment"."Basic Information"."Person Number" BY DESCRIPTOR_IDOF("Human Resources - Workforce Deployment"."Department Hierarchy"."SUBLOB Name")) s_6FROM "Human Resources - Workforce Deployment"WHERE((DESCRIPTOR_IDOF("Human Resources - Workforce Deployment"."Department Hierarchy"."LOB Name") = '300000015389973') AND ("Pay Grade"."Pay Grade Name" <> 'DEV') AND ("Job"."Job Code" <> 'LTDJBA') AND (("Workforce Event Facts"."Employee Voluntary Termination Count" > 0) OR ("Workforce Event Facts"."Employee Involuntary Termination Count" > 0)) AND (cast("Gregorian Calendar"."Year" as integer) = case when (cast(substring(Valueof("CURRENT_MONTH") from 8 for 2) as integer)-1) = 0 then (cast(valueof("CURRENT_YEAR") as integer) -1 ) else (cast(valueof("CURRENT_YEAR") as integer) ) end) AND ("Gregorian Calendar"."Month Name" = VALUEOF("PREVIOUS_MONTH_OBIA")))ORDER BY 4 ASC NULLS LAST, 3 ASC NULLS LAST, 5 ASC NULLS LAST, 2 ASC NULLS LAST) TERMS
Any help someone could provide would be much appreciated. Thank you in advance for reviewing my inquiry.