MySQL easy question CURDATE()
- by Tristan
I want to compare two results
one is stored in the first query, and the other is exactly the same as the first, but i want only to recieve data < today
"SELECT s.GSP_nom as nom, timestamp, COUNT(s.GSP_nom) as nb_votes, AVG(v.vote+v.prix+v.serviceClient+v.interface+v.interface+v.services)/6 as moy
FROM votes_serveur AS v
INNER JOIN serveur AS s ON v.idServ = s.idServ
WHERE s.valide = 1
AND v.date < CURDATE()
ROUP BY s.GSP_nom
HAVING nb_votes > 9
ORDER BY moy DESC LIMIT 0,15";
is that correct ?
thank you