I having a problem where a data doesn't listed(no affected row) when query with max command but without max command there is no problem(displays 2 rows), the data listed. Does anyone know what the root cause? I'm using 10.1.30-MariaDB This is the problem command;
SELECT ib.Id AS 'IB_RecID'
FROM (csm_installbase ib
LEFT JOIN systeminformation si1 ON ((si1.IB_RecID = ib.Id))
)
WHERE (si1.Id IN (SELECT MAX(si3.Id)
FROM systeminformation si3
GROUP BY si3.IB_RecID))
The data listed without max command;
SELECT ib.Id AS 'IB_RecID'
FROM (csm_installbase ib
LEFT JOIN systeminformation si1 ON ((si1.IB_RecID = ib.Id))
)
WHERE (si1.Id IN (SELECT si3.Id
FROM systeminformation si3
GROUP BY si3.IB_RecID)
)
I tried to use LIMIT but prompt with "This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery" error box.
Thank you in advance for any help and effort.