some combination of sort, wc, cut and grep
Word of warning: none of these tools are CSV-aware. You can hack together something that will work for basic files, but once you get something with quotations or escapes to include commas within the text of a field, you will really want a true CSV parser.
sqlite3 can import and export CSV files directly.
Python's csv module is great.
VisiData is a cool CLI spreadsheet/csv/database viewer.