Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HQL query required with left outer join

 
umair naqvi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two tables namely deliverydetails and supplybilldetails with following SQL create statements





Their respective classes are

getters and setters are omitted……..


getters and setters are omitted……..


Tables are connected with supplybilldetail.id  deliverydetails.billdetailid

Problem is that I need to find the HQL query for the group sum of deliverydetails.qty on deliverydetails.billdetailid but I simply can’t. Following query works



I want to add something like
“ where s.qty > sum(d.qty) group by s.id “ can somebody help me out???
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!