我想结合这两个语句,尝试了很多在线搜索,但我只是flumoxed和尝试各种组合似乎不工作(在Toad for Oracle)。试图结合2选择语句
帮助! (声明一次做2到完成)
声明1
select *
from climate_trends.CT05_baseline_values
inner join climate_trends.CT03_grid_boxes
on climate_trends.CT05_baseline_values.location_id
=
climate_trends.CT03_grid_boxes.grid_box
声明2
select *
from climate_trends.CT05_baseline_values
where averaging_period_id in ('Spr','Sum','Aut','Win')
and climate_variable_id in('MeanTemp')
and location_type_id = 'Box'
and baseline_period = '1981-2010';
我现在已经添加了真正的价值,如果这使得更好的感觉?试图让一个单一的表,其中CT03保存空间参考我需要让加盟...
编辑您的问题,包括样本数据和预期的结果。 –
您想对查询2的结果集执行查询1吗?带有'union all'的 – Azar
? –