• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with query

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

lets say that i have managers and employees
i want to get all managers that the sum of their employees salery is bigger than 100.

I try this:


select manager.id
from manager left join manager.employees
where having sum (employees.salery) > 100
group by manager.id

but i get the syntax is incorrect.

Can you please advice?

10x
 
my overalls have superpowers - they repel people who think fashion is important. 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!