Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
grade
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton Yushko
grade
Commits
932c545b
Commit
932c545b
authored
10 years ago
by
RomanSteinberg
Browse files
Options
Downloads
Patches
Plain Diff
FIX: GetRatesForGroupByStage
parent
bba9024c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
db/StoredProcedures.sql
+8
-8
8 additions, 8 deletions
db/StoredProcedures.sql
with
8 additions
and
8 deletions
db/StoredProcedures.sql
+
8
−
8
View file @
932c545b
...
...
@@ -747,15 +747,15 @@ BEGIN
END //
DROP PROCEDURE IF EXISTS GetRatesForGroup
2
//
CREATE PROCEDURE `GetRatesForGroup
2
`
DROP PROCEDURE IF EXISTS GetRatesForGroup
ByStage
//
CREATE PROCEDURE `GetRatesForGroup
ByStage
`
( IN `pDisciplineID` INT, IN `pGroupID` INT, IN `pMilestone` INT)
NO SQL
BEGIN
SELECT view_disciplines_students.StudentID,
view_disciplines_students.LastName,
view_disciplines_students.FirstName,
view_disciplines_students.SecondName,
view_disciplines_students.LastName
As LastName
,
view_disciplines_students.FirstName
As FirstName
,
view_disciplines_students.SecondName
As SecondName
,
SUM(rating_table.Rate*(view_roadmap.ModuleType = '
regular
')) AS '
intermediate
',
SUM(rating_table.Rate*(view_roadmap.ModuleType = '
bonus
')) AS '
bonus
',
SUM(rating_table.Rate*(view_roadmap.ModuleType = '
extra
')) AS '
extra
',
...
...
@@ -770,12 +770,12 @@ BEGIN
LEFT JOIN `rating_table` ON rating_table.StudentID = view_disciplines_students.StudentID AND
rating_table.SubmoduleID = view_roadmap.SubmoduleID
WHERE view_disciplines_students.DisciplineID = pDisciplineID AND
view_disciplines_students.SemesterID = @CurrentSemesterID AND
view_disciplines_students.GroupID = pGroupID AND
NOT view_disciplines_students.AttachType <=> '
detach
' AND
( (view_roadmap.ModuleType != '
exam
' AND view_roadmap.ModuleType != '
extra
')
OR view_roadmap.SubmoduleOrderNum < pMilestone )
GROUP BY view_disciplines_students.StudentID;
GROUP BY view_disciplines_students.StudentID
ORDER BY LastName ASC, FirstName ASC, SecondName ASC;
END //
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment