VisiData is amazing. It's one of the coolest open source projects I've seen in years. I use it extensively in my research.
An intro to the SQL interface (vdsql) can be seen here: https://www.visidata.org/blog/2022/connect-visidata-to-sql-d...
Also, there is the VisiData Tutorial by Jeremy Singer-Vine.
This is a very helpful introduction to VisiData.
https://jsvine.github.io/intro-to-visidata/index.html
I am a big fan of VisiData for working with data in the terminal. I also like John Kerl's miller[1] and Simon Willison's sqlite-utils [2] when I want to do queries. These are useful for working with data in simple shell scripts.
[1] https://github.com/johnkerl/miller [2] https://github.com/simonw/sqlite-utils
Not the right tool for everything, but it shines for quickly glancing at the shape of tabular data and making sense of it. Sorting, filtering, joins across files, column histograms and even column splitting/rejoining are all keystrokes away.
It groks anything even remotely table shaped like CSV, JSONL, JSON, even Excel files, it can even directly connect to databases and parse tables out of HTML.
https://www.visidata.org/