There is an easy way of writing query inside ODI
Right click on the any datastore of the required technology on which you wish to run the query and select Data.
Click on the SQL (?) on the Top Left and type in your query inside the query box and get results in the result box as you can see in the above screen .
Have fun and enjoy and look odiexperts for more tips and tricks.