SELECT
    user_.id,
    name,
    email,
    password,
    salt,
    role AS "role: Role",
    function AS "function: UserFunction",
    areaId,
    locked,
    lastLogin,
    receiveNotifications
FROM
    user_,
    availability
WHERE
    availability.id = $1
    AND availability.userId = user_.id
ORDER BY
    id;
