SELECT row_id, creation_date, created_by, last_update_date, last_updated_by,
last_update_login, note_to_receiver, pll_note_to_receiver,
rma_reference, transaction_id, interface_transaction_id,
displayed_trans_type, transaction_type, transact_qty, transact_uom,
transaction_date, item_rev, displayed_dest_type, deliver_to_location,
deliver_to_person, subinventory, receipt_num, displayed_source_type,
order_num, po_release, order_line, po_shipment, supplier,
country_of_origin, supplier_site, source_doc_qty, source_doc_uom,
vendor_item_num, vendor_lot_num, packing_slip, freight_carrier,
bill_of_lading, reason, hazard, un_num, wip_entity_id, wip_line_id,
wip_operation_seq_num, receipt_exception_flag, receiver, source_type,
destination_type_code, item_id, category_id, ship_to_location_id,
locator_id, supplier_id, supplier_site_id, shipment_header_id,
shipment_line_id, req_header_id, req_line_id, po_header_id,
po_line_id, po_line_location_id, po_distribution_id, po_release_id,
shipment_num, displayed_source_doc_code, source_doc_code, item_desc,
routing, comments, attribute_category, attribute1, attribute2,
attribute3, attribute4, attribute5, attribute6, attribute7,
attribute8, attribute9, attribute10, attribute11, attribute12,
attribute13, attribute14, attribute15, currency_code,
currency_conversion_type, currency_conversion_date,
currency_conversion_rate, rate_type_display, oe_order_header_id,
oe_order_num, oe_order_line_id, oe_order_line_num, customer_id,
customer, customer_site_id, inspection_quality_code,
secondary_quantity, secondary_unit_of_measure
FROM rcv_vrc_txs_v
WHERE EXISTS (
SELECT 1
FROM rcv_shipment_lines rsl
WHERE rsl.to_organization_id = x
AND rcv_vrc_txs_v.shipment_header_id = rsl.shipment_header_id)
AND -1 = -1
AND (rcv_vrc_txs_v.organization_id = x)
AND (transaction_id = 10939)
ORDER BY transact_qty, displayed_trans_type DESC, transaction_date DESC