added function to insert data into database to analyze most frequently viewed videos