Unique sort with three fields

I have another file with three columns A,B,C as below

123,1,502
123,2,506
123,3,702
234,4,101
235,5,104
456,6,104
456,7,100

i want to sort such that i get a unique value in column A, and for those with multiple value in A, i want the lowest value in C.
output should be

Code:
123,1,502
234,4,101
235,5,104
456,7,100

awk -F, '!(a[$1]) || a[$1]>$3 {a[$1]=$3; b[$1]=$2} END{for(e in a) print e","b[e]","a[e]}' infile | sort -t, -k1

works perfect,thanks Kevintse

If the input file is already sorted:

awk -F, '!_[$1]++' infile

Otherwise:

sort -t, -k1n -k3n infile |
  sort -t, -uk1n