Programming, Alibaba Cloud, Database, Postgresql, Data Analytics.
循环若干次，若干=a的记录数。取出最后一个VALUE。 from a limit 1000000000 -- 这个不加的话有点问题，可能是个BUG，已反馈给社区。 ) t where (t.b).aid is not null; -- 取出b表中已上报的记录. The subquery loops several times to get a number of records equal to a. And, fetch the last VALUE. select (t.b).aid,(t.b).val,(t.b).crt_time from ( select ( select b