Write down the number of keys generated in each query. To find the retention rate, divide the number of keys generated in Query B by the number of keys generated by Query A. For example, Query A generates 3,047 keys. Query B generates 2,869 keys. Divide 2,869 by 3,047. The retention rate is 94%.