select sql_text from v$sql q join v$session s on q.address = s.prev_sql_addr where s.sid = &sid and s.serial# = &serial;