I need to find the top 10 frequent numbers in column 1 whose values are 'blue' in column 2. So far I am able to get the top 10 of ALL numbers, but not sure how to add the column 2 constraint. I have this code so far:
awk -F ',' '{print $1}' data.csv | sort | uniq -c | sort -nr | head -10
I think I will need to incorporate '$2=='blue''
somewhere?