SELECT DISTINCT
LAST_VALUE(`name`) OVER `win` AS `last_name`,
LAST_VALUE(`dateism`) OVER `win` AS `last_dateism`,
`idshare`
FROM `table`
WINDOW `win` AS (
PARTITION BY `idshare`
ORDER BY `dateism`
RANGE BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING
)