Retrieval SQL changes.