statistics: reimplemented 'old' sqlite format