add distinct query