0

i have the below MySQL query and when excecated it throwing an error "every drived table must have it's own alias"

select mfssessionId,
       senderMobile,
       receiverMobile,
       serviceName,
       channelName,
       createdAt LoginDate,
       status,
       substring(str, ps - 1, POSITION(',' in right(str, length(str) - ps + 1))) IpAddrs
from (select *,
             requestPayLoad                                                              str,
             POSITION('clientAddress' IN requestPayLoad)                                 ps,
             substring(str, usn - 1, POSITION(',' in right(str, length(str) - usn + 1))) Username
      from (select *, requestPayLoad str, POSITION('username' IN requestPayLoad) usn
            from loggingprofile13
            where mfsSessionId = 'WEB;32227221013;ZbJ7e')
     ) z;
Jeroen
  • 579
  • 5
  • 19
  • 1
    Just what the error says. Your loggingprofile13 subquery needs to have an alias. End with`)y)z` instead of `))z` – ysth Nov 14 '22 at 05:47

0 Answers0