TIME REDUCE(OPTIMISE QUERY)

Posted by user2527657 on Stack Overflow See other posts from Stack Overflow or by user2527657
Published on 2013-06-28T04:16:19Z Indexed on 2013/06/28 4:21 UTC
Read the original article Hit count: 51

Filed under:
|
select a.userid,(select firstName from user where userid=NOTUSED.userid) as z,
(select max(login_time) from userLoginTime AS b where userid = a.user_id 
GROUP BY b.user_id ORDER BY b.user_id) as y 
From(SELECT DISTINCT a.user_id FROM user AS a 
      LEFT OUTER JOIN (SELECT (userid) FROM userlogintime 
                       where serialid=15400012)AS b ON user.user_id = b.user_id
where a.Serialid=15400012 AND b.userid IS NULL) NOTUSED, 
Relation r, user a where r.childuserid = NOTUSED.userid 
and guarduserid = a.userid

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql