結果 : write retention query in sql with example