Add DISTINCT to sql ospf ngb