I have a situation where i need to `execute` a **second** `query` based on first `query` result.

here is my first query result:

```
id  current_date    starts_on   ends_on Product_id  days_remaining
1   2017-06-21T12:00:00 2017-06-20T12:00:00Z    2017-06-23T12:00:00Z    3   2
2   2017-06-21T12:00:00 2017-06-01T12:00:00Z    2017-06-03T12:00:00Z    4   0
3   2017-06-21T12:00:00 2017-06-01T12:00:00Z    2017-06-03T12:00:00Z    7   0
4   2017-06-21T12:00:00 2017-07-01T12:00:00Z    2017-07-03T12:00:00Z    5   12

```

Here you can see `remaining_days` having 2 **zeros(0)** as result on that occurence i want to get all `product_name` from `product` table

> 
> My Both the Tables and Query for Above result is implemented but for
>  getting product\_name is not implemented. please help me here
> 
> 
> 

**here is my sqlfiddle:** <http://sqlfiddle.com/#!9/5bf34/1>

**MY QUESTION:** i want to get all `product_name` if `days_remaining` (see above result) is 0

> 
> in short get all product\_name if days\_remaining is 0
> 
> 
>