Common table expressions (CTEs) are a great way to temporarily store a set of results
Some systems use a single currency as a base, which is something that I noticed