I have a database containing two tables :
(id, name, is_active)
(id, event_id, status, message)
I'd like to list all the events that had at least 3 different
logs in it and is still active (
) and I can't come up with the correct
query to do that.
(I can add more details if needed, just ask :) ).
Here's the SQLFiddle : http://sqlfiddle.com/#!9/a7442
In that example, I'm looking to get the event ID 2 because it contains 3 different status in event_log : INFO, WARNING and ERROR.
Event ID 1 and 3 contains less than 3 and so are excluded.
Thank you for your help!