# Selecting multiple values with different conditions in the same table

**URL:** https://community.influxdata.com/t/selecting-multiple-values-with-different-conditions-in-the-same-table/510
**Category:** Systems
**Tags:** influxdb, nagios, grafana
**Created:** [April 6, 2017, 3:03pm UTC](https://community.influxdata.com/t/selecting-multiple-values-with-different-conditions-in-the-same-table/510 "2017-04-06T15:03:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![VenkiSa](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VenkiSa](https://community.influxdata.com/u/VenkiSa)
#### Post date: [April 6, 2017, 3:03pm UTC](https://community.influxdata.com/t/selecting-multiple-values-with-different-conditions-in-the-same-table/510/1 "2017-04-06T15:03:12Z")

</div>

![](https://discoursecommunity.s3-us-west-1.amazonaws.com/original/1X/7798b3b809c385fd756d18662db30b9edb339a4d.png)this how metrics table in my nagflux database looks like.

```
time	host service	value	
1491488866000000000	ups01slvkonfw03bxilan	Check_BatterryStatus	1	
1491488866000000000	ups01slvkonfw03bxilan	Check_BatteryCapacity	46.93	
1491488866000000000	ups01slvkonfw03bxilan	Check-Load-Current	1612	
1491488866000000000	ups01slvkonfw03bxilan	Check-BatteryVoltage	55	
1491488866000000000	ups01slvkonfw03bxilan	Check-Batteryruntime	600	

```

I am trying to query for hosts with batterysatus =1 and get other service values of that perticualr host into a table like this. Is it possible ?

```
host Check_BatterryStatus	Check_BatteryCapacity	Check-BatteryVoltage	Check-Batteryruntime
ups01slvkonfw03bxilan	1	46.93	55	600
```
