MySQL Forums
Forum List  »  Newbie

Re: Need help Building mysql query to count specific data under same table/row
Posted by: Praveen yadhav
Date: September 28, 2016 05:38AM

To make this more simple I have two query which gives me results. I want to combine these tow query with keeping date as common from both the query.

1st Query : I get the distinct user_id count of "Flash c Log" date wise

SELECT to_char(created),count(distinct user_id) as Flash_log from events where event_type = 'Flash Client Log'
and created between '25-SEP-16' AND '27-SEP-16' group by to_char(created) order by to_char(created) asc

2nd Query : I get the distinct user_id of "Client C Log"

SELECT to_char(created), count(distinct user_id) as Client_log from events where event_type = 'Client Cyber Log'
and created between '25-SEP-16' AND '27-SEP-16' group by to_char(created) order by to_char(created) asc

I wanted to combine the results of 'Flash C Log' & "Client C Log" side by side arranged date wise.

Any help on this is much appreciated.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.