I'm having an issue after joining two tables with a 1-many relationship. Essentially I am getting duplicate rows as some columns not present in the new table were unique and required their own row. Now I would like to remove the duplicates but with the condition that POA_CODE is used once per Council_Name.
Apologize for the formatting. New to stack overflow and SQL.
UID | POA_CODE | POA_NAME | Council_Name
8532 | 2000 | Sydney City | Lane Cove
1130 | 2000 | Sydney City | Sydney
1132 | 2000 | Sydney City | Sydney
1133 | 2000 | Sydney City | Sydney
1134 | 2000 | Sydney City | Sydney
1137 | 2000 | Sydney City | Sydney
1145 | 2000 | Sydney City | Sydney
1147 | 2000 | Sydney City | Sydney
1151 | 2000 | Sydney City | Sydney
1155 | 2000 | Sydney City | Sydney
1161 | 2000 | Sydney City | Sydney
1165 | 2000 | Sydney City | Sydney
1166 | 2000 | Sydney City | Sydney
I have found other solutions to similar issues, but they have all been limiting the duplicates by frequency or by name. Mine is more of a condition. The actual table itself is 8000 plus rows with many Council names and post codes so any solution specific to 'Sydney' or '2000' will not work.
Thanks in advance for the help.
Aucun commentaire:
Enregistrer un commentaire