git-history icon indicating copy to clipboard operation
git-history copied to clipboard

Do something with this column changes query

Open simonw opened this issue 3 years ago • 1 comments

This query shows which columns are most frequently updated, ignoring those for version = 1

select columns.name, count(*)
from item_changed
  join item_version on item_changed.item_version = item_version._id
  join columns on item_changed.column = columns.id
where item_version._version > 1
group by columns.name
order by count(*) desc

Maybe turn this into a view?

simonw avatar Dec 06 '21 22:12 simonw

I used this in my blog post: https://simonwillison.net/2021/Dec/7/git-history/

simonw avatar Dec 08 '21 00:12 simonw