select this_.id as id1_13_0_,this_.application_name as applicat2_13_0_,this_.assignment_snapshot as assignme3_13_0_,this_.event_type as event_ty4_13_0_,this_.start_date as start_da5_13_0_,this_.parent_oid as parent_o6_13_0_,this_.reason_data as reason_d7_13_0_,this_.reason_key as reason_k8_13_0_,this_.reason_ref as reason_r9_13_0_,this_.reason_request_business_id as reason_10_13_0_,this_.reason_request_id as reason_11_13_0_,this_.requester_full_name as request12_13_0_,this_.requester_oid as request13_13_0_,this_.role as role14_13_0_,this_.role_oid as role_oi15_13_0_,this_.target_oid as target_16_13_0_,this_.timestamp as timesta17_13_0_,this_.end_date as end_dat18_13_0_,this_.type as type19_13_0_fromreport_role_history_item this_where(this_.target_oid in ($1) or this_.parent_oid in ($2))order by this_.timestamp desc limit $3