change the target probability according to the previous answers

issues: #24
use constants instead of hardcoded numbers
remove useless user_id from GROUP BY