Skip to content

Instantly share code, notes, and snippets.

@rawkode
Created June 8, 2020 13:35
Show Gist options
  • Save rawkode/11830489b4ebeadc2d0bfaf94b914329 to your computer and use it in GitHub Desktop.
Save rawkode/11830489b4ebeadc2d0bfaf94b914329 to your computer and use it in GitHub Desktop.
from(bucket: "devrel-platform-metrics")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "docker_hub")
|> filter(fn: (r) => r["_field"] == "pull_count")
|> group(columns: ["url"])
|> count()
|> group()
|> sort(columns: ["_value"], desc: true)
@jjok
Copy link

jjok commented Jun 9, 2020

OK. I'm watching some videos so I actually understand this stuff. Hopefully I'll be able to work out the other query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment