58. PromQL
SQL:
SELECT city, AVG(value)
FROM temperature_Celsius
WHERE country=”germany” GROUP BY city
PromQL:
avg by(city) (temperature_celsius{country=”germany”})
59. PromQL
SQL:
SELECT errors.job, errors.instance, […more labels…],
errors.value / total.value
FROM errors, total
WHERE errors.job=”foo” AND total.job=”foo” JOIN
[…some more complicated stuff here…]
PromQL:
errors{job=”foo”} / total{job=”foo”}