Fixed order in query so graph displays correctly