MySQL easy question CURDATE()

Posted by Tristan on Stack Overflow See other posts from Stack Overflow or by Tristan
Published on 2010-04-24T05:18:42Z Indexed on 2010/04/24 5:23 UTC
Read the original article Hit count: 255

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-query