I've digged another tiny tool I wrote in the past. This time it's CSV Cruncher.
This tool takes a few .csv files and turns them into SQL tables.
Then you can query the data and export another CSV.
This gives you all the power of SQL, if you consider you can use all the tricks like self-joins, recursive selects, triggers, stored procedures. It uses HyperSQL.
Want to give it a try? Check out here: GitHub - OndraZizka/csv-cruncher
Since Google dumped Google Code and trashed all the code on it, I've lost it (it's on some old disk but who knows where).
So the version on Github is decompiled (by Windup).
If it wouldn't work, file an issue and let me know, I will fix