How to model stats for viewer stats?

How do you model the schema for stats for views for a video/page over time(day, month, year) and be able to graph it ?