Hi,
I need some help please on building an SQL query. Bear with me as I attempt to explain below:
We have users attempting a purchase of a product, if they fail due to insufficient credit an entry is input in a DB table call rev_loss.
Here is an example of a row in the table:
created_t = 1077399562
account_num = 12345
event_price = 5
current_bal = 49
credit_limit = 50
I would like to total up the cost (event_price) of all the transactions for a given day (created_t > xxx and created_t < xxx) BUT for only the FIRST attempted purchase by each account_num.
I need to write the query in SQL no PL/SQL please.
Thanks
LGJ
I need some help please on building an SQL query. Bear with me as I attempt to explain below:
We have users attempting a purchase of a product, if they fail due to insufficient credit an entry is input in a DB table call rev_loss.
Here is an example of a row in the table:
created_t = 1077399562
account_num = 12345
event_price = 5
current_bal = 49
credit_limit = 50
I would like to total up the cost (event_price) of all the transactions for a given day (created_t > xxx and created_t < xxx) BUT for only the FIRST attempted purchase by each account_num.
I need to write the query in SQL no PL/SQL please.
Thanks
LGJ