Removed " at the end of the query.
Replaced cleaned_package_key with package_key.
Removed irrelevant calls to apm_tcl_or_sql_name_from_package_key.
Got a suggestion or an issue? Discuss it on the Atlassian Community or visit Atlassian Support for other options.