1
SELECT table1.*,table2.*, table3.*
FROM table1, table2, table3
inner join
(
select table1.id AS pid, max(table1.createtime) AS timestamp
from table1 group by table1.id
) A on A.pid = table1.id AND A.timestamp = table1.createtime
WHERE table3.id = table1.id
ORDER BY table1.createtime;
table1의 각 ID에 대해 마지막으로 수정 된 레코드 만 가져 오려고합니다. 내가 같은 오류가 발생하고 위의 쿼리 은 내부 조인 쿼리에서 도움이 필요합니다.
:"%s:invalid identifier" for "A.timestamp = table1.IDA2A2" this part.
날이 쿼리에 어떤 문제가 있는지 알려 주시기 바랍니다. DB는 Oracle입니다.