Hi everybody,
I got a problem with mysql 3.23.56 with windows xp.
I wrote this SQL Statement and it worked fine:
"SELECT COUNT(*) as SchubAnzInGr,
Round((TO_DAYS(NOW()) - TO_DAYS(SichereDiagnose)) / 365)
as ErkDauer
FROM Diagnostik, Schuebe
WHERE Diagnostik.MitgliedsNr = Schuebe.MitgliedsNr
GROUP BY ErkDauer";
But in the next step I have to work with the temporary Fields SchubAnzInGr and ErkDauer like this:
SELECT AVG(SchubAnzInGr) as AVGSchubAnz From ...
Group By ErkDauer
Thanx for any help
Frank
p.s.
Maybe something like :
SELECT AVG(SchubAnzInGr) as AVGSchubAnz FROM (SELECT ...)
Group by ErkDauer???
I got a problem with mysql 3.23.56 with windows xp.
I wrote this SQL Statement and it worked fine:
"SELECT COUNT(*) as SchubAnzInGr,
Round((TO_DAYS(NOW()) - TO_DAYS(SichereDiagnose)) / 365)
as ErkDauer
FROM Diagnostik, Schuebe
WHERE Diagnostik.MitgliedsNr = Schuebe.MitgliedsNr
GROUP BY ErkDauer";
But in the next step I have to work with the temporary Fields SchubAnzInGr and ErkDauer like this:
SELECT AVG(SchubAnzInGr) as AVGSchubAnz From ...
Group By ErkDauer
Thanx for any help
Frank
p.s.
Maybe something like :
SELECT AVG(SchubAnzInGr) as AVGSchubAnz FROM (SELECT ...)
Group by ErkDauer???