Add sql for the timelogging part