I just say min total instead of in my final query and I run that and my answer is that 175 is the cheapest way to get from A to B. Now here is an alternative formulation of the same query That essentially parallels the alternative that we looked at with our project cross where we built in project X into our recursion that simplified the recursion in that case. 