Is it possible to use MAX with a condition?
(I'm a bit rusty with PostgreSQL, but I believe the query below is ISO-compliant and so should work):

SELECT
    MAX( date_executed) as last_executed,
    MAX( CASE WHEN user_id = $userId THEN date_executed END ) AS last_executed_by_user
FROM
    jobs;
GROUP BY
    some_other_field



$userId is a parameter you'll specify in your PostgreSQL client library.
A CASE WHEN x THEN y END expression without an ELSE case will evaluate to NULL when x is false or Unknown.
The MAX aggregate function only considers non-NULL values, therefore it only considers values in jobs.date_executed when jobs.user_id = $userId.


You can also use the FILTER clause to get the same result (thanks for the tip, ypercubeᵀᴹ!):

SELECT
    MAX( date_executed) AS last_executed,
    MAX( date_executed ) FILTER ( WHERE user_id = $userId ) AS last_executed_by_user
FROM
    jobs;
GROUP BY
    some_other_field


Both queries will return last_executed_by_user = NULL if there are no rows where user_id = $userId.