I have a table with the following records
id name city
1 aaa NY
2 bbb NY
3 ccc LA
4 ddd LA
5 eee NY
I want the table with an additional column by comparing the 'city' column. The values in the col4 should have '1' for every unique value in 'city' column and '0' for the repeating values in 'city' column.
id name city col4
1 aaa NY 1
2 bbb NY 0
3 ccc LA 1
4 ddd LA 0
5 eee NY 0
I hope to get some help.
Thanks