Quote Originariamente inviata da razzoli Visualizza il messaggio
SELECT COUNT(DISTINCT *) FROM tabella WHERE Punti < (SELECT Punti FROM tabella WHERE UserId = 'CCCC')

Non l'ho provata.

Ciao Grazie per la risposta ma mi restituisce un errore

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) FROM tabella WHERE Punti < (SELECT Punti FROM tabella WHERE UserId= 'CCCC')
' at line 1