Is there a way to give a subquery in Oracle 11g an alias like:
select *
from
(select client_ref_id, request from some_table where message_type = 1) abc,
Your query should be fine.
An alternative would be:
select abc.client_ref_id, abc.request, def.response
from some_table abc,
some_table def
where abc.client_ref_id = def.client_ref_id
and abc.message_type = 1
and def.message_type = 2;
I wouldn't be surprised if Oracle rewrote the queries so that the plan would be the same anyway.