Hi<br><br>I have not understand why you tell that you have 3 tables. HQL is based on core model (mapping files) not on SQL tables.<br><br>You must write the query in hql and you must use objects in your core model not id :<br>
<br><pre>     select <a href="http://dm.id">dm.id</a>, dm.drug_name, sum(cds.qty_available)<br>        from drug_master dm<br>        left join cds_drugstore.drug_master cds<br>            and cds.cds_id = 1<br>            and cds.source_id = &#39;sourceName&#39;<br>
            and cds.source_type = &#39;c&#39;<br>        group by <a href="http://dm.id">dm.id</a><br><br><br></pre><br>