# How I can use two timeseries column in grafana 7.1.3 for date range selection, I am using Postgres

**URL:** <https://community.grafana.com/t/how-i-can-use-two-timeseries-column-in-grafana-7-1-3-for-date-range-selection-i-am-using-postgres/35799>\
**Category:** InfluxDB\
**Tags:** postgres\
**Created:** [August 28, 2020, 6:24am UTC](https://community.grafana.com/t/how-i-can-use-two-timeseries-column-in-grafana-7-1-3-for-date-range-selection-i-am-using-postgres/35799 "2020-08-28T06:24:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nisarghande](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@nisarghande](https://community.grafana.com/u/nisarghande)\
**Post date:** [August 28, 2020, 6:24am UTC](https://community.grafana.com/t/how-i-can-use-two-timeseries-column-in-grafana-7-1-3-for-date-range-selection-i-am-using-postgres/35799/1 "2020-08-28T06:24:54Z")

</div>

Please see below the query, I am unable to use two timeseries column in postgres sql query

 ![grafana](https://us1.discourse-cdn.com/grafana/original/2X/3/35cc0de33071114c86f60070dc6dc7edacccb4ba.png)

Select executionid, workflowname, **min(starttime)**, **max(endtime)** endtime from tablename  
where executionid not in (Select distinct executionid from tablename where description=‘failed’)  
group by executionid,workflowname;
