Classify your timestamps by which portion of the hour they fall into (using integer division) then group by
that classification. So your inner query will look like:
SELECT MAX(dt) max_dt
FROM my_table
GROUP BY DATE(dt), HOUR(dt), MINUTE(dt) DIV 15