Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

383
Vistas
How to query data based off of Grafana's absolute time range?

I have a grafana dashboard that is connected to a PostgreSQL database. I understand how to change the absolute time range to show a time range on a graph, but am wondering if it is possible to change my query to reflect that for a total.

For example, I have a query that gets the total number of rows:

SELECT
  COUNT(*) as "Total Number of Rows:"
FROM mytable

Is it possible to show the total number of rows for the specified time in grafana (ex. past 30 days, past 6 hours, etc)?

Thanks!

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You have to modify your query as follow:

SELECT
  $__time(time_column),
  count(*) as "Total Number of Rows:"
FROM
  mytable
WHERE
  $__timeFilter(time_column) 
GROUP BY time_column

In this way Grafana will filter using $__timeFilter on the specified time_column

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda