Jump to content

[SOLVED] Sum points in multiple tables


Shazbot!

Recommended Posts

I receive a list of events through out the year. The events have an associated point value.

Participants attend the events and receive points.

Every semester participants can use the points to purchase items that are on auction.

 

I would like to create a query that will calculate the total points for each participant - the points spent.

 

 

table1 which contains event information, including points.

 

table 2 contains the attendance of participants along with the program IDs.

 

table 3 contains the points used and personal info.

 

I can sum table 1 and table 2 to get the total points participants have earned but now I need to subtract that number by table 3 points used.

 

I am having difficulty creating the second portion. Any advice is greatly appreciated.

 

I can do this in PHP but want to create a stored procedure.

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.