select track_id from
lorsm_student_track
where user_id = :user_id
select community_id
from lorsm_student_bookmark
where user_id = :user_id
update lorsm_student_track
set user_id = :to_user_id
where user_id = :from_user_id
update lorsm_student_bookmark
set user_id = :to_user_id
where user_id = :from_user_id
select count(1) as result
from ( select distinct l.course_id
from lorsm_student_track l
where l.community_id=:comm_id
group by l.course_id) as t