I've just discover this utility and I am really impressed. It is so far the best utility I've found to play with csv.
However, there is a small improvement which I think is fairly small but will unlock many features.
As far as I understand, there is at the moment no support for subqueries. Subqueries can be really usefull for lots of reason but I came across this problem trying to use GROUP CONCAT with DISTINCT and SEPARATOR.
This si not supported at the moment by sqlite (problem with the parser) can in my case could be solved but using subqueries.
I understand subqueries might be difficult to parse, however sqlite support WITH statement which make subquery a breeze.
Instead of writing
SELECT * FROM <subquery>
one can write
WITH (<subquery) as sub1
SELECT * FROM sub1
This doesn't work with q because it attempts to find a file named sub1 instead of leaving it as it is.
What would solve the problem, I think, is to have a way to "escape" a table name so that q just ignore it and doesn't try to create a table from a file. The syntax I can think of would be something like prefixing with ! , \ etc or back quoting it, like
I've just discover this utility and I am really impressed. It is so far the best utility I've found to play with csv. However, there is a small improvement which I think is fairly small but will unlock many features. As far as I understand, there is at the moment no support for subqueries. Subqueries can be really usefull for lots of reason but I came across this problem trying to use GROUP CONCAT with DISTINCT and SEPARATOR. This si not supported at the moment by sqlite (problem with the parser) can in my case could be solved but using subqueries. I understand subqueries might be difficult to parse, however sqlite support WITH statement which make subquery a breeze.
Instead of writing
one can write
This doesn't work with
q
because it attempts to find a file namedsub1
instead of leaving it as it is. What would solve the problem, I think, is to have a way to "escape" a table name so thatq
just ignore it and doesn't try to create a table from a file. The syntax I can think of would be something like prefixing with!
,\
etc or back quoting it, likeor
or