Partho Paul
09/14/2022, 7:38 AMCREATE VIEW IF NOT EXISTS FinalView AS
SELECT
a.id,
a.id1,
a.id2,
b.id,
b.id1,
b.state,
c.id,
c.id1,
c.version,
d.id
FROM
A a
LEFT JOIN B b
ON b.id = a.bId
INNER JOIN C c ON c.id = b.cId
AND c.version = a.version
LEFT JOIN (SELECT * FROM D d
WHERE d.state = 'COMPLETED'
AND d.id = b.dId
AND d.id2 = a.id2
ORDER BY d.sessionNo DESC LIMIT 1) AS dLast ON d.id2= a.id2
AND d.version = a.version
;
In this I’m facing an issue where AndroidStudio is saying that it is not able to find table b and d in my subquery statement. Can someone please let me know what I’m doing wrong here?hfhbd
09/17/2022, 3:39 PMAS
explicitly?