有人看到这个查询有什么问题吗?我一直在尝试很多不同的事情,但我做错了
SELECT h.guru_or_guru_user_id,
(
(0.25 * (s.total_pips/sr.highest_total_pips)) +
(0.2 * (s.total_gain/sr.highest_total_gain)) +
(0.15 * (sr.lowest_volatility/s.volatility)) +
(0.05 * (s.running_weeks/sr.most_running_weeks)) +
(0.15 * (s.total_trades/sr.most_total_trades)) +
(0.2 * (s.average_profit_loss_ratio/sr.highest_average_profit_loss_ratio))
) AS guru_score
from gt_view_mt_stats as s
inner join gt_history as h
on s.login = h.login
and h.is_guru_history = 1
left join gt_view_stats_records as sr
group by h.guru_or_guru_user_id
order by guru_score desc