i want to find a number of clients from certain dates before and after there was a status changes in their credit history. eg:
- date = 2010/07/25
- date2 = 2010/08/30
i want everyone from the table who had a status "pending" before "date" and from the same lists of people, i want to identify lists of clients whose status changed from "pending" to "approved" after "date2". eg
- before "date", i had 20k clients with "pending" status
- after "date2", i still have 20k clients but some went from pending to approved and i want to identify these clients
below is my table description:
- i have a table that store just unique information
- the second is a transaction table of the first table, that records every single activity with a timestamp. its really detailed minute by minute table records.
i tried doing a direct join with these two tables, but still wasn't sure if i was getting everyone. the reason is, the second transaction table stores every status "states" (pending, approved) and time.
what is common in both tables are:
- status
- client_id