Updated SQL join and color for test