I have a table iminvtrx which holds records of inventory receipts
Trying to do a select statement that will grab the last receipt date and the qty received.
select t.item_no, MAX(t.doc_dt) as LastReceiptDate, t.quantity
from iminvtrx_sql t join imitmidx_sql i on t.item_no = i.item_no
where t.source = 'R' and t.doc_type = 'R' and i.pur_or_mfg = 'P'
group by t.item_no, t.doc_dt, t.quantity
But its returning multiple records for the same item_no.
I would only expect one record for each item_no