例如。我有这个查询
select distinct t1.date1, t2.date2
from t1
join t2 ...
....
where ...
我想获取这 2 个日期的唯一值列表。我如何在 Firebird 2.5 上执行此操作?
我试试这个
with dates as (
select t1.date1 d1, t2.date2 d2
from t1
join t2 ...
....
where ...)
select d1 from dates
union
select d2 from dates
但是这个版本会降低性能两倍