Move insert_query_for_one_day method from HistoryMySQL to parent.

It can also be used for other DBs which supports multiple insert.