How to run query on database from pgAdmin and terminal - OpenERP (Odoo)

Hello,

I would like to share how to run query on database from pgAdmin and terminal. - OpenERP (Odoo) .This was too easy to do but this post is specially for beginner in query.