tente a junção interna em vez de sub-consulta, é o padrão para orientar a consulta sem executar em dados, mas pode estar seguindo a consulta para ajudá-lo.
SELECIONE
User
.id
, User
.username
, User
.password
, User
.role
, User
.created
, User
.modified
, User
.email
, User
.other_user_id
, User
.first_name
, User
.last_name
, User
.place_id
, Resume
.id
, Resume
.user_id
, Resume
.other_resume_id
, Resume
.other_user_id
, Resume
.file_extension
, Resume
.created
, Resume
.modified
, Resume
.is_deleted
, Resume
.has_file
, Resume
.is_stamped
, Resume
.is_active
DE
streetofwalls
.users
AS User
LEFT JOIN
my_database
.attempts
AS Attempt
ATIVADO (Attempt
.user_id
=User
.id
E Attempt
.test_id
!=5)LEFT JOIN my_database
.reports
AS Resume
ATIVADO (Resume
.user_id
=User
.id
) ,
my_database
.users
AS Usuário1 LEFT JOIN
my_database
.tags_users
AS TagUser ativado (User1
.id
=TagUser
.user_id
) LEFT JOIN
my_database
.tags
AS Tag ON (TagUser
.tag_id
=Tag
.id
) ONDE
User
.id
=User1
.id
E Attempt
.test_id
=8AND Attempt
.score
> 60E
Resume
.has_file
=1AND Tag
.id
='8' E Tag
.id
!='3'GRUPO POR User
.id
ORDER POR Attempt
.score
DESC;