# Query Different Datasources

**URL:** <https://community.grafana.com/t/query-different-datasources/46822>\
**Category:** Grafana\
**Created:** [April 29, 2021, 6:40pm UTC](https://community.grafana.com/t/query-different-datasources/46822 "2021-04-29T18:40:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmarley](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pmarley](https://community.grafana.com/u/pmarley)\
**Post date:** [April 29, 2021, 6:40pm UTC](https://community.grafana.com/t/query-different-datasources/46822/1 "2021-04-29T18:40:22Z")

</div>

Hello,  
I’m trying to filter metrics results based on the results from a Postgres query. ie.

Postgres (customer list)  
select id, name, server\_id from customers

Prometheus  
server\_uptime{serverId=`postgres server_id here`}

Is it possible to perform such a query and visualize it in a table?

Thanks

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [May 3, 2021, 9:35pm UTC](https://community.grafana.com/t/query-different-datasources/46822/2 "2021-05-03T21:35:20Z")

</div>

Hi @pmarley,

Have you explored using variables to create dynamic dashboards?

[I’d check out this list of official example dashboards that use template variables](https://grafana.com/docs/grafana/latest/variables/variable-examples/)

[I’d also start exploring our documentation on the subject](https://grafana.com/docs/grafana/latest/variables/). It is one of the more complex elements to dashboard design, but it’s very powerful.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [April 29, 2022, 6:40pm UTC](https://community.grafana.com/t/query-different-datasources/46822/3 "2022-04-29T18:40:42Z")

</div>

Closed on April 29, 2022, 6:40pm UTC

This topic was automatically closed after 365 days. New replies are no longer allowed.
