Reducing joins on tipp query