I have a table which looks something like:
id batch_id start_ts stop_ts
I want to select those ids which started yesterday (can be easily done by giving start_ts > .. AND start_ts < ..) and have another id in the table with the same batch_id as the batch_id of this id and that id ended yesterday.
What would be a good way to frame this MySQL query?