ddstats/sql/races/get_races_by_map.sql

19 lines
389 B
MySQL
Raw Normal View History

SELECT
name,
map,
time,
timestamp,
server,
ARRAY[cp1, cp2, cp3, cp4, cp5,
cp6, cp7, cp8, cp9, cp10,
cp11, cp12, cp13, cp14, cp15,
cp16, cp17, cp18, cp19, cp20,
cp21, cp22, cp23, cp24, cp25
] AS checkpoints,
gameid,
ddnet7
FROM record_race WHERE map = $1
ORDER BY name, time
OFFSET (($2 - 1) * $3)
FETCH NEXT $3 ROWS ONLY