Created
July 29, 2017 04:31
-
-
Save keehyun2/2d9204535a76b3f8aecf4927be7ad0e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update | |
test_k a | |
left outer join( | |
select parent, floor(avg(progress)) as avg | |
from test_k | |
group by parent | |
) b on a.id = b.parent | |
set | |
a.progress = b.avg | |
where | |
avg is not null; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment