Gute Idee. Eine ähnliche Möglichkeit wäre:
SQL-Code:
SELECT max(A.Total) AS Total, A.Id, C.Lagerplatz
FROM (
SELECT 0 AS Total, Zähler AS Id FROM Tabelle1
UNION
SELECT SUM(Preis) AS Total, IdSchrank AS Id FROM Tabelle2 GROUP BY IdSchrank
) A
LEFT JOIN Tabelle1 C ON (A.Id=C.id)
GROUP BY A.Id, C.Lagerplatz
Gruß
K-H