In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
SELECT
u.user_id,
username,
ac.quickest_time AS intScore
FROM
users u
JOIN
(
SELECT
accepted_challenges.user_id,
MIN(accepted_challenges.time_taken) AS quickest_time
FROM
accepted_challenges
WHERE
accepted_challenges.challenges_id = 1
) ac
ON ac.user_id = u.user_id