Finding the latest date with specific criteria
I work in the training area at my organization. We are trying to determine "What is the latest date they have completed all of their required training?" For example, a new agent comes in, and they are assigned Program A, Program B, and Program C. We want to know what the latest completion date is when they have completed all 3. I have tried ETL (image attached) and SQL and cannot seem to get the output I need. We would also add a few more "filters" such as "Is licensed = Y."
select `Agent Code`, `Program Title`, MAX(`Program Enrollment Completion Date`) as "RTS Date"
WHERE `Program ID` = '16'
and `Program ID` = '12'
and `Program ID` = '64'
and `Program Enrollment Status 3` = 'Complete'
group by `Agent Code`
Any help would be much appreciated.