SELECT
submission.id AS id,
user.username AS username,
submission.language AS language,
submission.details AS details,
submission.code AS code
FROM submission JOIN user
ON user.id = submission.user_id
WHERE submission.problem_id = ?1
ORDER BY length(submission.code);
