Jump to content

SQL Query and Simple ADD maths


jacko_162

Recommended Posts

Wonder if someone can help me out:

 

i have 3 Tables (kill, Item_dropped, item_price)

 

what i am trying to do is calculate the price of items that have dropped from each individual kill.

 

so the kill_dropped looks like:

 

itd_kll_id 	itd_itm_id 	itd_quantity
7926 		2476 		3
7926 		23563 		5
7924 		31892 		1
7924 		21640 		3
7924 		2488 		2 

 

then the item_price will be like:

 

id 	price
2476 		300 
23563 		5000
31892 		14500
21640 		12000
2488 		5650 

 

so i need the query to relate to the following:

 

SELECT all prices where itd_kll_id = 7924 and add them up to give me a total.

 

can anyone help me out?

 

i forgot to mention there is a quantity row to encounter also.

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.