ddstats/sql/races/get_races_by_player.sql

18 lines
404 B
MySQL
Raw Permalink 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 name = $1
ORDER BY map, time
OFFSET (($2 - 1) * $3)
FETCH NEXT $3 ROWS ONLY