Tpch Query Implementation - catch NPTR! -- horrible coding