new sql file, add pagenum, add top function, add timestamp