esoe 2 years ago
parent
commit
3948b8fef2
  1. 7
      src/main/sql/script.sql

7
src/main/sql/script.sql

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

Loading…
Cancel
Save