[SOLVED, by me :-))]Calculate in query ??
Posted: Thu Jan 06, 2005 3:06 am
Hi,
I've got a query in which I want to add a calculation.
This is the query:
I want to divide Punten trough Tijd AS HitF and order by it desc.
The actual order by Punten can be dropped.
Anybody an idea ?? Tried several ways, but no luck..
Any help is very much appreciated !
I've got a query in which I want to add a calculation.
This is the query:
Code: Select all
SELECT klasse.Klasse,
deelnemer.Naam AS Deelnemer,
deelnemer.Vereniging AS Vereniging, deelnemer.
URL AS URL, wedstrijd.Naam AS Wedstrijd,
truncate(score.punten ,2) AS Punten,
truncate(score.Tijd ,2) AS Tijd
FROM deelnemer inner join inschrijving on deelnemer.Id = inschrijving.DeelnemerId
inner join wedstrijd on inschrijving.WedstrijdId = wedstrijd.Id
inner join klasse on inschrijving.KlasseId = klasse.Id
inner join score on inschrijving.Id = score.InschrijvingId
inner join score as s2 on inschrijving.Id = s2.InschrijvingId
where wedstrijd.Naam = ('PolderGein')
GROUP BY klasse.Klasse, deelnemer.Naam, deelnemer.Vereniging , deelnemer.URL, wedstrijd.Naam, truncate(score.punten ,2)
HAVING Punten = min(truncate(s2.punten,2))
ORDER BY klasse.Klasse,Punten descThe actual order by Punten can be dropped.
Anybody an idea ?? Tried several ways, but no luck..
Any help is very much appreciated !