|
|
|
@ -1,11 +1,8 @@
@@ -1,11 +1,8 @@
|
|
|
|
|
-- пользователи |
|
|
|
|
SELECT id, username, email FROM mdl_user |
|
|
|
|
-- опросы |
|
|
|
|
SELECT id, name FROM mdl_quiz; |
|
|
|
|
-- попытки /общие данные |
|
|
|
|
SELECT id, quiz, userid, attempt, timestart, timefinish, sumgrades FROM mdl_quiz_attempts; |
|
|
|
|
|
|
|
|
|
-- отчет |
|
|
|
|
-- для отчета --> |
|
|
|
|
WITH pure AS ( |
|
|
|
|
SELECT |
|
|
|
|
mqa.id as pure_id, |
|
|
|
@ -23,7 +20,7 @@ WITH pure AS (
@@ -23,7 +20,7 @@ WITH pure AS (
|
|
|
|
|
FROM mdl_quiz_attempts as mqa |
|
|
|
|
LEFT JOIN mdl_quiz as mq on mqa.quiz=mq.id |
|
|
|
|
LEFT JOIN mdl_user as mu on mqa.userid=mu.id |
|
|
|
|
WHERE mqa.userid > 3849 |
|
|
|
|
WHERE mqa.userid >= 4114 |
|
|
|
|
) |
|
|
|
|
SELECT |
|
|
|
|
pure_id, |
|
|
|
|