mysql - SQL with group by and having clause -


i have table a

id   saln  indicator   1    100      2    100    b   3    200      4    200    c   5    100    c   6    300    b   7    200    d 

i need pull saln table after grouping saln , group having indicator a,b ,c only

saln 100 

please let me know sql this

select saln indicator in('a','b','c') group saln having sum(indicator) = 100 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -