Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to fetch highest score in minimum time using mysql

SELECT gameid, 
       MIN(date) AS FirstTime, 
       MAX(date) AS LastTime,
       MAX(score) AS TOPscore.
       COUNT(*)  AS NbOfTimesPlayed 
FROM highscores
WHERE userid='2345' 
GROUP BY gameid
-- ORDER BY COUNT(*) DESC -- for ex. to have games played most at top
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fetch #highest #score #minimum #time #mysql
ADD COMMENT
Topic
Name
6+9 =