# Converting Mysql query to lucene query

**URL:** <https://discuss.elastic.co/t/converting-mysql-query-to-lucene-query/155996>\
**Category:** Elasticsearch\
**Created:** [November 9, 2018, 7:43am UTC](https://discuss.elastic.co/t/converting-mysql-query-to-lucene-query/155996 "2018-11-09T07:43:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emma1](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@emma1](https://discuss.elastic.co/u/emma1)\
**Post date:** [November 9, 2018, 7:43am UTC](https://discuss.elastic.co/t/converting-mysql-query-to-lucene-query/155996/1 "2018-11-09T07:43:50Z")

</div>

Hi I have some queries in mysql which need to be incorporated in Kibana.  
I Imported table data from MySql to Elasticsearch

select a.r\_date, a.failed\_aborted\_job, b.expired\_trigger\_job from

(select DATE(currenttime) as r\_date,count(\*) as FAILED\_ABORTED\_JOB from samsungautomation.tbl\_hybris\_cronjob where customstatus="FAILED\_ABORTED\_JOB" group by DATE(currenttime) ) as a,

(select DATE(currenttime) as r\_date,count(\*) as EXPIRED\_TRIGGER\_JOB from samsungautomation.tbl\_hybris\_cronjob where customstatus="EXPIRED\_TRIGGER\_JOB" group by DATE(currenttime) ) as b

where a.r\_date=b.r\_date

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 7, 2018, 7:43am UTC](https://discuss.elastic.co/t/converting-mysql-query-to-lucene-query/155996/2 "2018-12-07T07:43:51Z")

</div>

Closed on December 7, 2018, 7:43am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
