# Running 3 queries in logstash

**URL:** <https://discuss.elastic.co/t/running-3-queries-in-logstash/370304>\
**Category:** Logstash\
**Tags:** elastic-stack-sql\
**Created:** [November 11, 2024, 7:21am UTC](https://discuss.elastic.co/t/running-3-queries-in-logstash/370304 "2024-11-11T07:21:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santanu112](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@Santanu112](https://discuss.elastic.co/u/Santanu112)\
**Post date:** [November 11, 2024, 7:21am UTC](https://discuss.elastic.co/t/running-3-queries-in-logstash/370304/1 "2024-11-11T07:21:07Z")

</div>

HI ,

I want to use below sql queries 🙂

1. select id form table 1 (it will give millions id)
2. select id, name from table 2
3. select id , location from table 3  
My doc should look like below :  
{  
id :1  
name : abc  
location : xxx  
}  
{  
id : 2  
name : def  
location : yyy  
}

previously i was using jdbc,in file { jdbc streaming and aggregate ) to bind 2 queris.. but for 3 queries its not running..

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 11, 2024, 1:26pm UTC](https://discuss.elastic.co/t/running-3-queries-in-logstash/370304/2 "2024-11-11T13:26:08Z")

</div>

What does the pipeline configuration look like? And what do you mean by "not running"? Is the pipeline not executing or is it executing and resulting in events with the wrong data?
