Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

Sum value and running total based on unique id from another table

$
0
0

I have a table with unique local id's, local text, values, standardized ID's, and standardized text that looks like this:

 

local IDlocal Textvaluestd IDstd Text
123Ibuprofen15AAAIBUPROFEN
456Advil4AAAIBUPROFEN
789Motrin0AAAIBUPROFEN
111Amoxil3BBBAMOXICILLIN
222Trimox5BBBAMOXICILLIN
333Amoxicillin7BBBAMOXICILLIN
444E.E.S.6CCCERYTHROMYCIN

 

I'm trying to populate two fields in a different table, 'sum of value' and 'running total' for values grouped by the 'std ID' so it looks like this:

 

std IDstd Textsum of valuerunning total
AAAIBUPROFEN1919
BBBAMOXICILLIN1534
CCCERYTHROMYCIN640

 

I've found answers to MANY of my questions in this forum in addition to very useful techniques that I didn't think possible, but have not found this situation addressed.


Viewing all articles
Browse latest Browse all 216047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>