SQL retrieves duplicate even if distinct specified -
im trying retrieve distinct competence_id
rows table has duplicate ones based on:
select distinct competences.competence_id, skillmgt.* competences join skillmgt on competences.competence_id=skillmgt.cid skillmgt.eid=121 , datename(yyyy,skillmgt.timestamp)='2013'
but gets competence_id
s duplicates.
you need group by.
select competences.competence_id, skillmgt.* competences join skillmgt on competences.competence_id=skillmgt.cid group competences.competence_id
Comments
Post a Comment