SELECT state,business,a.reportFROM baseWHERE state IN (SELECT a.state FROM heart a join (SELECT CAST(MAX(percent_adults) AS DOUBLE) max1 FROM heart)b on (a.percent_adults=b.max1));在上述子查询中,只能返回一个值,即表8 R$ T! G6 q( A
heart”中的a.state。该值用于主查询,并从基本表中获取业务。我需要从报表的子查询中获取’heart’表返回a.report以及state和business。非常感谢!$ ^1 n4 Y. \7 M. z3 d
: d) U: n3 W6 z+ }1 H1 H 解决方案: