Update hist_tosql.py