I have a large SQL database which looks like this:
For a single column, I would count frequency with the command:
SELECT col1,count(1) FROM tbl GROUP BY col1;
to give something which looks like this:
But ideally, I would want a command which ran the above over all specified columns, matching on the Value column, and filling the blanks out with 0. Is this possible in any SQL implementation? Im currently using SQLite, but we're in a fairly open relationship.
This is my 'desired' output:
Aucun commentaire:
Enregistrer un commentaire