Recreating commit count graphs from db

Hi all, I’m wondering where I can find commit-level data in the gitlab db schema. I’m interested in recreating the charts I find in repo/graphs/master/charts but I’m having trouble finding where that data resides in the gitlab db so I can build it in sql and join it to some other data I have.