I have a table that records steps of a move. For example:
Date - Movement - Product
2018-30-10 - produced - id1
2018-30-11 - packed - id1
2018-30-12- dispatched - id1
2018-30-10 - produced - id2
2018-30-10 - produced - id3
2018-30-11 - packed - id3
2018-30-10 - produced - id4
I would like a search that would return the products that were packed and not shipped. But I could only do it inside a loop in my application. Can I do this with just one query?