mercredi 31 décembre 2014

Grabbing the top (or lowest) result from a row sorted by groups of ids?


Vote count:

0




So the title might be a little confusing because I'm a little confused myself. What I am trying to do is grab the lowest time of a completed map from a mysql database to display in a table on a website. The maps are sorted by an id (MapID) with a time on the same row.


Example of a couple of rows with same MapID (the time is in seconds):



MapID: Time:
1 28.234
1 24.874
1 18.244
2 213.521
2 164.6


So I'd like to grab the lowest time from each MapID and be able to display that on a table in my site. How would I query something like this?



asked 46 secs ago







Grabbing the top (or lowest) result from a row sorted by groups of ids?

Aucun commentaire:

Enregistrer un commentaire