我想进行内部联接,但我没有任何结果:
select
t5.tcdv_id, t5.gps_coordx, t5.gps_coordy,
t6.status
from
(
select
t3.tcdv_id tcdv_id, t3.reg_date reg_date,
t4.CONTROLLERCOMM_STATUS status
from
SCS_L_SCSCONTROLLERSTATUS t4
inner join
(
select
t1.tcdv_id tcdv_id,
max(reg_date) reg_date
from
SCS_L_SCSCONTROLLERSTATUS t2
inner join
(
select distinct
tcdv_id
from
SCS_L_SCSCONTROLLERSTATUS
where
tcdv_id not in('C1010000','C10100000')
) t1
on
t1.tcdv_id=t2.tcdv_id
group by
t1.tcdv_id
) t3
on
t3.tcdv_id=t4.tcdv_id and
t3.reg_date=t4.reg_date
) t6
inner join
(
select
t.tcdv_id tcdv_id, t.int_ip int_ip,
b.gps_coordx gps_coordx, b.gps_coordy gps_coordy
from
bits.tms_m_node b
inner join
tscs.scs_m_intlc@"BITS_TSCS.CORE.TMC.LOCAL" t
on
t.node_id=b.node_id
) t5
on
t5.tcdv_id=t6.tcdv_id;