SELECT sample_tasks.id, sample_tasks.Student, sample_tasks.task_id, MAX(sample_tasks.balls) FROM (SELECT students.id, CONCAT_WS(' ', students.`surname`, LEFT(students.name, 1), LEFT(students.`fatherhood`, 1)) AS "Student", reports.task_id, reports.balls FROM students
INNER JOIN groupslists ON students.`id` = groupslists.`student_id`
INNER JOIN `groups` ON groupslists.group_id = groups.id
INNER JOIN studings ON groups.id = studings.group_id
INNER JOIN disciplines ON studings.id = disciplines.id
INNER JOIN tasks ON disciplines.id = tasks.discipline_id
INNER JOIN reports ON students.id = reports.student_id AND reports.task_id = tasks.id
WHERE disciplines.name LIKE "Базы данных" ORDER BY balls DESC) AS sample_tasks
GROUP BY sample_tasks.task_id
[student@localhost a]$ tar tvf aa/arc1.tar | grep -E ' \bd' | awk '{print $NF}' | xargs -IX tar xvf aa/arc1.tar X
[student@localhost a]$ ls
aa ab ac
[student@localhost a]$ cd aa
[student@localhost aa]$ ls
aaa aab aac arc1.tar my my1 my2 pp ppp
[student@localhost aa]$
ServerName domain.com
SSLEngine on
SSLCertificateFile /home/ubuntu/websites/domain.com.conf/domain.com.pem
SSLCertificateKeyFile /home/ubuntu/websites/domain.com.conf/domain.com.key
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
ProxyPass / http://127.0.0.1:81/ nocanon
ProxyPassReverse / http://127.0.0.1:81/
RequestHeader set X-Forwarded-Proto "https"