Is it possible to do the following without creating a representation between them? That is, simply attaching these SELECT directly?
CREATE VIEW temp_first AS SELECT MIN(DATE) AS mindate,id FROM mytable GROUP BY id # SELECT *, t.mindate FROM aggregate_analysis a JOIN temp_first t ON t.id = a.id WHERE (.... ) ORDER BY mindate DESC
You should be able to replace the view link in the selection with the sub query / sub selection.
Take a look
Sort of
SELECT *, t.mindate FROM aggregate_analysis a JOIN ( SELECT MIN(DATE) AS mindate, id FROM mytable GROUP BY id ) as t ON t.id = a.id WHERE (.... ) ORDER BY mindate DESC