Create a view based on the query and then use lineage: https://docs.snowflake.com/en/user-guide/ui-snowsight-lineage