title: converting sql into HQL
body: <p>I am using <a href="http://www.mkyong.com/struts2/struts-2-hibernate-integration-with-full-hibernate-plugin/" rel="nofollow">http://www.mkyong.com/struts2/struts-2-hibernate-integration-with-full-hibernate-plugin/</a> 
  as my refernce for struts+hibernate.I need to replace 
  "return session.createQuery("from Customer").list();" in CustomerDAOIMPL.java with the following query</p>
  
  <pre><code>select u.Loginid,c.CID,CNAME,CTICKER,STOCKVALUE,VARIATE,VARIATE_PERCENT,PREVIOUS_DAY_STOCK,MARKET
  from company_details c,users_details u,user_company uc where uc.loginpk=u.loginpk AND uc.CID=c.CID AND uc.loginpk IN (select LOGINPK from users_details where LOGINID="check")
  </code></pre>
  
  <p>how to do write such a query in HQL[Hibernate Query Language] I tried reading my tutorials for google
  but nothing go into my mind.Please help me,if possible give the link of tutorial for  creating HQL from SQL involving Joining tables which is very simple to understand</p>