Entspricht …
SELECT
a.Datum,
a.Std,
m.Spalte1,
m.Spalte2
FROM
table1 a
JOIN table2 m ON
a.ID = m.ID
WHERE
...
SELECT
a.Datum,
a.Std,
SUM() as Gesamt
m.Spalte1,
m.Spalte2
FROM
table1 a
JOIN table2 m ON
a.ID = m.ID
WHERE
...
GROUP BY
a.Datum ASC
ORDER BY
a.Datum ASC
Deinem Vorhaben?