EDIT: I guess he is asking for sorting by part 3, so you're right. A little simpler to use "Last":
SortBy[{{a, 2, "az"}, {c, 1, "aa"}, {d, 3, "ba"}}, Last]
Looking at his expected results, it looks like he wants to sort by Part[#,2]&
SortBy[{{a, 2, "az"}, {c, 1, "aa"}, {d, 3, "ba"}}, Part[#, 2] &]
Returns
{{c, 1, "aa"}, {a, 2, "az"}, {d, 3, "ba"}}