1
從下面的查詢中,我想查找包含每個request_id的最後一個activity_dt的事件。我一直在爲此工作數小時,但無濟於事。誰能幫忙?從聯盟中獲取最大行數
select a.event as event, a.activity_dt as activity_dt, b.request_id as request_id
from gs_pr_obl_event a, gs_pr_obl b
where a.obligation_id = b.obligation_id
union all
select event as event, activity_dt as activity_dt, request_id as request_id
from gs_pr_req_event;