Oracle Receivables last transaction entered against a customer
We have Oracle E Business suite 11.5.10.2. I have written an sql script to try and find the date last transaction entered against each customer. My script is not working and I was wondering if some could point out what is wrong or how I can correct it?
select
a.trx_date,
a.trx_number,
k.description batch_description,
l.name batch_name,
k.name,
a.complete_flag,
a.status_trx,
b.line_number,
b.line_type,
b.description invoice_line_desc,
c.gl_date,
c.amount,
d.segment1 "CO",
d.segment2 "CC",
d.segment3 "PROJ",
d.segment4 "OBJ",
f.party_type,