PHP msSQL DISTINCT columns

wxdqz

New Member
Hello,

I want to be able to get the sum() of a column, but only include rows where another column is unique. If it worked, it might look like this:

'SELECT sum(col1) WHERE DISTINCT col2'

I am using PHP4 and msSQL.

Thanks, Ben
 
Back
Top