数据集中的话,同一个数据库,可以子查询实现
帆软中,可以数据集公式来能引用
https://help.fanruan.com/finereport/doc-view-4244.html --参考SQL中用SQL函数