it's my first post and I hope everything will be clear for you. I've got table such as:
client ; cost
Paula ; 100
Paula ; 50
Jacob ; 300
Paula ; 120
I want to add another column "client2" where value will be 1 if there wasn't duplicates or if there was duplicate it should 1 only for the duplicate with the biggest cost, so:
client ; cost ; client2
Paula ; 100 ; 0
Paula ; 50 ; 0
Jacob ; 40 ; 1
Paula ; 120 ; 1
In real table there are 2000 records. How should I write it in SQL Server? Thanks in advance, Paula