Please see my *ix accounting page for an example of sum-by in action.
sum-by can optionally make use of my modunits python module to perform unit conversions in your reports. If modunits.py isn't on the python import path, then sum-by will still function, but it won't be able to do unit conversions.
Download it here
You can e-mail the author with questions or comments: