PCA (Prometheus Certified Associate) sample exam question with answer 65

Question:
Which PromQL expression selects the maximum value of the cpu_usage metric for each instance of a target?

  1. max by (instance)(cpu_usage)
  2. max_over_time(cpu_usage[5m])
  3. max without (instance)(cpu_usage)
  4. max(cpu_usage)
Answer:
A - The max by() function groups the values of a metric by the specified label, in this case instance, and returns the maximum value for each group