Add table stat function.