Join 加积与自联接

Join 加积与自联接,join,aggregation,Join,Aggregation,嗨,我正在处理这个查询,想知道是否有一个好的方法来实现。表A as zone_no price produceDate 54 12.33 20161201 58 7.88 20161224 64 28.27 20160812 67 20.45 20160405 87 14.08 20161102 92 1.69 20160101 1

嗨,我正在处理这个查询,想知道是否有一个好的方法来实现。表A as

zone_no   price     produceDate
54         12.33     20161201
58         7.88      20161224
64         28.27     20160812
67         20.45      20160405
87         14.08      20161102
92         1.69       20160101
101        12.57      20140501
141        22.21      20150601
157        14.28      20160417

select max(price) from tableA where zone_no between 54 and 145

select max(price) from tableA where Zone_no between 92 and 141

outcome: 
price(Zone 54-145)  price(zone 92-141)
28.27                   22.57
如何在没有CTE的情况下实现这一点?谢谢

替代解决方案

select sum(een), sum(twee) from (

select max(price) as een, 0 as twee from tableA where zone_no between 54 and 145
union
select 0, max(price) from tableA where Zone_no between 92 and 141

)

你可以使用一个并集吗?或者你想要相邻的值。如果可以的话,我希望它们彼此相邻,谢谢