title: Quantiles in Prometheus Summary - What can I do with them in PromQL
body: <p>I have a summary metric for endpoint latency "my_metric_api_latency_seconds" with a few quantiles calculated by the client for e.g. p50, p90, p95, p99 etc and I also have a set of labels associated with the metric.</p>
  
  <p>consider I have the following time-series as:
  my_metric_api_latency_seconds{host="host-1.win", instance="local", api="/api/foo", status="200", quantile=".95"} = 0.05</p>
  
  <p>my_metric_api_latency_seconds{host="host-2.win", instance="web", api="/api/foo", status="200", quantile=".95"} = 0.76</p>
  
  <p>my_metric_api_latency_seconds{host="host-3.win", instance="native", api="/api/foo", status="200", quantile=".95"} = 0.55</p>
  
  <p>We know that summary quantiles are not aggregatable. Since, the quantiles are calculated by the client, PromQL queries are much faster as well.</p>
  
  <p>My question is</p>
  
  <ul>
  <li><p>How can I use PromQL query which will give me the overall p95 latency
  results for the endpoint "api/foo" over all the hosts.</p></li>
  <li><p>If I have another time series for another endpoint for e.g. my_metric_api_latency_seconds{host="host-1.win", instance="local", 
  api="/api/foo2", status="200", quantile=".95"} = 0.05. How can I use PromQL query to give me the overall latency of host = "host-1.win" aggregated over all the other labels.</p></li>
  </ul>