Among all the times event no.2 happened when the app user was not active, when was the earliest time this situation happened?
event no. refers to event_id; event_id = 2; not active refers to is_active = 0; earliest time refers to MIN(timestamp);
SELECT T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T1.is_active = 0 AND T2.event_id = 2 ORDER BY T2.timestamp LIMIT 1