In the database I am using there is a table which ranks records, this is really useful as you can select the most recent one by saying 'seq_rev = 1'. However, there are times where I don't want the most recent one but I want 'seq_rev = 2' because that is the first record with a certain status.
Is there a way that I could use MIN in a where clause for this?
For example, my where clause would say something like "where tag = 'Offer' and MIN(seq_rev)".
Does anyone have any ideas?
Thanks in advance!