amgp_release associates UPC codes (amgp_upc) with album IDs (amgp_a_id).  You'd think that this would be a one-to-one relationship, but apparently multiple IDs can share the same UPC code.  Question:  What are the UPCs that are associated with multiple IDs?  Query:
select count(*), amgp_upc 
    from (select distinct amgp_upc, amgp_a_id from amg.amgp_release) tbl
    group by amgp_upc 
    having count(*) > 1
No comments:
Post a Comment