I like the idea, and I like sql, but I feel like this is a lot more typing for the same information you could extract using just git commands. Am I missing something? Take for instance:
The commit example:
select name, count(name), from commits group by name
The commit example:
is actually: The tag example: is actually: The branch example: is actually: