Weird DQL grammar

Are you familiar with SQL? Try to guess results of the following DQL-queries:

1.

select d.r_object_id from dm_document d 
   right outer join dm_folder f on (d.r_object_id=f.r_object_id) 

2.

select f.r_object_id from dm_document d 
   right outer join dm_folder f on (d.r_object_id=f.r_object_id) 

3.

select for write d.r_object_id from dm_document d 
   left outer join dm_folder f on (d.r_object_id=f.r_object_id) 

Answers:

1. set of document ids, though set of nulls is expected – DQL parser knows about right outer join but it eliminates statement when translating query to SQL
2. error, though set of folder ids is expected – the same reason as 1
3. nothing, if user is a superuser or has folder restrictions – CS incorrectly translates DQL query to SQL