show number of sql and filter results