# Streamlining Postgresql Query

**URL:** <https://community.grafana.com/t/streamlining-postgresql-query/76816>\
**Category:** Dashboards\
**Created:** [November 25, 2022, 5:37pm UTC](https://community.grafana.com/t/streamlining-postgresql-query/76816 "2022-11-25T17:37:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jugunu](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jugunu](https://community.grafana.com/u/jugunu)\
**Post date:** [November 25, 2022, 5:37pm UTC](https://community.grafana.com/t/streamlining-postgresql-query/76816/1 "2022-11-25T17:37:47Z")

</div>

Hi Team,  
We have a requirement of streamlining the query used in multiple panels.  
Say we have 3 different panels - A,B and C which uses individual query and our plan is to bring the fourth panel -D using a single query bringing in all the metrics used in A, B and C (which will be a union of all the 3 panels [A,B and C]).  
So our idea is to make use of the combined output data in the panel -D and distribute to other 3 panels - A,B and C.  
We found the below links to be useful for bringing in the output of a panel to another, but the problem we are observing is that resulting panel query is non-editable. The final panel will show the complete set of values from the first query.

> **[Learn Grafana: Share query results between panels to reduce load time |...](https://grafana.com/blog/2020/10/14/learn-grafana-share-query-results-between-panels-to-reduce-load-time/)**
>
> Check out the latest in Developer Advocate Marcus Olsson's series of quick tips on how to get the most out of Grafana.

> **[Share query results with another panel | Grafana documentation](https://grafana.com/docs/grafana/v9.0/panels/query-a-data-source/share-query/)**
>
> Share query results with another panel Grafana let you use the query result from one panel for any other panel in the dashboard. Sharing query results across panels reduces the number of queries made to your data source, which can improve the...

---

<div class="post-metadata">

**Author:** ![awslearnings89](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@awslearnings89](https://community.grafana.com/u/awslearnings89)\
**Post date:** [November 25, 2022, 6:00pm UTC](https://community.grafana.com/t/streamlining-postgresql-query/76816/2 "2022-11-25T18:00:50Z")

</div>

This is really a good scenario.  
Can you please see if the transformation helps?

> **[You should know about... transformations in Grafana | Grafana Labs](https://grafana.com/blog/2021/02/24/you-should-know-about-transformations-in-grafana/)**
>
> The Solutions Engineering team offers pro tips on how to make the most of these Grafana 7+ features that allow you to manipulate your data before it’s in your dashboard.
