Advertisement
Guest User

Untitled

a guest
May 21st, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Product vendor
  2. id name fkvid id name
  3. 1 a 1 1 va
  4. 2 b 1 2 vb
  5. 3 c 3 3 vc
  6.  
  7.  
  8. How many products does each vendor deliver?
  9.  
  10. select ven.name ,count(p.fkvid) from Product pod ,vendor ven where pod.fkvid = ven.id group by ven.name ,pod.fkvid
  11.  
  12. 2 Questions ::
  13. 1 is above mentioned query right?
  14.  
  15. 2 in Hibernate 1 to Many relationship , how to convert it ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement