"Clean or Net" Approval rate

Hello Team,

Thank you guys for being here.

I work in bank company. I have an idea to calculate “Net” Approval Rate for daily basis.

Flow: As you know, the owner of card number can make several attempts in a certain period of time. And I want to take into account only the last one (successful or rejected).

Example: Cardholder with card number 123456…1111 did 5 (or more/less) attempts for the last 30 min ( more or less). first 4 attempts were declined, the last one was successful/declined. So Ill take in account only the last one for exact period of time. In this case I want to exclude reattempts. Note that attempts can be with different income amounts.

The bottom line is that I want to see the approval rate in % 0-100%
Sometimes I want to change the attempt period/time period

Specific fields:
1.card_num. strings like 123456…1111
2.customer_email: strings like 123@g.com
3.status_to strings like DECLINED or CAPTURED
4. decline_reason strings like Not sufficient funds
5. history_creation_date time/date
6. customer_full_name cardholder name
7. currency
8. amount
9. bank_issuer

Thank you for your cooperation.