SELETEC * FROM `users` WHERE `id` = 1
SELECT
`users`.*,
(SELECT
`actions`.`date`
FROM
`actions`
WHERE
`actions`.`user`=`users`.`id`
ORDER BY
`date` DESC
LIMIT 1) AS
'last_action_date'
FROM
`users`
WHERE
`id` = 1
SELECT
`users`.*,
(SELECT
JSON_OBJECT(
'date', `actions`.`date`,
'action', `actions`.`action`
)
FROM
`actions`
WHERE
`actions`.`user`=`users`.`id`
ORDER BY
`date` DESC
LIMIT 1) AS
'last_action'
FROM
`users`
WHERE
`id` = 1