I also found this thread really helpful: https://forum.obsidian.md/t/how-to-reuse-a-dataview-query-dql/