Need help with Global Server List

OK I solved my own problem. Pivot Tables 4tw.

Here is the working query that got me most of what I wanted. I am just trying to work out how to only display the most recent item per server. It is 4am, that is a problem for another day.

For those looking for a possible solution to their problem. Here is the query.

from(bucket: “ALL-DCS-SERVERS”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “SERVER STATS”)
|> filter(fn: (r) => r[“_field”] == “UID” or r[“_field”] == “Lon” or r[“_field”] == “Lat” or r[“_field”] == “MaxPlayers” or r[“_field”] == “Name” or r[“_field”] == “Players” or r[“_field”] == “Description”)
|> pivot(rowKey:[“_time”], columnKey: [“_field”], valueColumn: “_value”)
|> group()
|> drop(columns: [“_start”, “_stop”, “_measurement”])
|> yield(name: “last”)