Sorting SUM of Calculated Field by other value in Table with SQL -
Sorting SUM of Calculated Field by other value in Table with SQL -
i calculating "onhand value" of products, multiplying 2 fields (onhand * price).
each product belongs class, , want know total onhand value of products within each product class.
not sure how this? here's code:
select class, (onhand * ptprice) part grouping class, (onhand*ptprice);
this lists the class each item, , item's value. want class single column , total of calculated onhand values class shown. guidance appreciated. i'm working in access 2013.
just add together sum
aggregate calculation part , remove calculation part group by
select class, sum(onhand * ptprice) part grouping class;
sql calculated-field
Comments
Post a Comment