atakan_1907 Posted September 28, 2006 Share Posted September 28, 2006 my code is"select a,b,c,d,e,sum(f) from table group by a,b,c,d,e having sum(f)>0"and i want to add a meaning of "where x='bla bla'" to this. how can i do that? i searched web but couldn't find an answer. how can i do friends... Link to comment Share on other sites More sharing options...
jesh Posted September 28, 2006 Share Posted September 28, 2006 Check out this link which explains GROUP BY and HAVING:http://www.w3schools.com/sql/sql_groupby.asp Link to comment Share on other sites More sharing options...
atakan_1907 Posted September 28, 2006 Author Share Posted September 28, 2006 i know it. where clause couldn't be used. but i don't know how can i do without where. please tell me Link to comment Share on other sites More sharing options...
lordfa9 Posted November 3, 2006 Share Posted November 3, 2006 select a,b,c,d,e,sum(f) from table group by a,b,c,d,e having sum(f)>0"i think you can try using WHERE here:select a,b,c,d,e,sum(f) from table WHERE X= bla blagroup by a,b,c,d,e, x having sum(f)>0"not sure if it works though, if not try removng the X from the group by clause Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now