Implement average length of packets queries