I have this query pulling from two tables. It essentially sums the column of a bunch of records then adds some more relevant data where the field EMPLID matches
SELECT TOP (100) PERCENT t1.FULLNAME, t2.TOTAL_HOURS, t2.EMPLID, t1.MGRID, t2.FiscalYear, t1.VPID
FROM myDB.dbo.USERSS AS t1 INNER JOIN
(SELECT EMPLID, SUM(Hours) AS TOTAL_HOURS, FiscalYear
GROUP BY EMPLID, FiscalYear) AS t2 ON t2.EMPLID COLLATE Latin1_General_BIN = t1.EMPLID
WHERE (t1.DELETED = 'N')
Is there a way for me to pull the same data but also have a record for each entry from the USERS table where there isn't anything found for that record's EMPLID in the REQUESTS table, and just set the SUM of TOTAL_HOURS to 0.00?