This is the sql. The data it returns is accurate. Just looking to simplify so that when running for other individuals the date we need to do a 52 week lookback for a total gross can be done thru a prompt for the specific date.
SELECT pay_check.emplid, employees.first_name, employees.last_name, Sum(pay_check.total_gross) AS [52 Week's Cumulative Gross]
FROM pay_check INNER JOIN employees ON pay_check.emplid = employees.key2_emplid
WHERE (((pay_check.key4_pay_end_dt)>=#12/4/2021#-365 And (pay_check.key4_pay_end_dt)<=#12/4/2021#))
GROUP BY pay_check.emplid, employees.first_name, employees.last_name
HAVING (((pay_check.emplid)="12345"));