Reduce number of queries necessary for a graphical view down to 4