Jump to content

Complicated Sum()


Recommended Posts

I need to write a query statment that will do the following$sql1="Select PK_BusinessID FROM tblBusiness where FK_AccountID ='$ses_var_PKAccountID' ";The trick is I want to find the SUM(Max_Ad_Pts) FROM tblAd for every PK_BusinessID that is found from $sql1 and just return one results $total_Max_Pts.I would apprecaite any help I can get.Thank you

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...