How to get records from the database which got one similar field and different dates
I really need your urgent help guys. I have one table 'ITEM' with fields: ID, NAME, STATUS, RECEIVED_AT (TIMESTAMP).

I need to get all records with status = 'canceled' and only if there is another record in this table with status = 'available' that has earlier received_at date. Can't do anything to it, maybe because it is Friday evening, or maybe because I am not yet experienced enough.

I am very appreciate for your help!
How to get records from the database which got one similar field and different dates
===

I really need your urgent help guys. I have one table 'ITEM' with fields: ID, NAME, STATUS, RECEIVED_AT (TIMESTAMP).

I need to get all records with status = 'canceled' and only if there is another record in this table with status = 'available' that has earlier received_at date. Can't do anything to it, maybe because it is Friday evening, or maybe because I am not yet experienced enough.

I am very appreciate for your help!