-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Login] Summary Statistics #9518
Changes from 18 commits
11c5fe6
8d5dedc
ddf2688
0003047
72b13f0
12daffb
f3ea9d7
8120431
3d7d972
82b7597
ac13cf7
b53883e
ae8f645
c465451
7df2508
a599a0e
066648c
e5e2305
91caf91
40a8e80
69e4a96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT c.CandID) AS count | ||
FROM candidate c | ||
JOIN Project ON c.RegistrationProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
AND c.Sex = 'Female' | ||
AND Entity_type = 'Human' | ||
GROUP BY Project.Name WITH ROLLUP |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT c.CandID) AS count | ||
FROM candidate c | ||
JOIN Project ON c.RegistrationProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
AND c.Sex = 'Male' | ||
AND Entity_type = 'Human' | ||
GROUP BY Project.Name WITH ROLLUP |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT psc.CenterID) AS count | ||
FROM psc | ||
JOIN session s ON s.CenterID = psc.CenterID | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(CandID) AS count | ||
FROM session s | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(DISTINCT TestID) AS count | ||
FROM flag f | ||
JOIN session s ON s.ID = f.SessionID | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(FileID) AS count | ||
FROM files f | ||
JOIN session s ON s.ID = f.SessionID | ||
JOIN Project ON s.ProjectID = Project.ProjectID | ||
WHERE Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SELECT | ||
IFNULL(Project.Name, 'All Projects') as ProjectName, | ||
COUNT(PhysiologicalFileID) AS count | ||
FROM physiological_parameter_file ppf | ||
LEFT JOIN physiological_file USING (PhysiologicalFileID) | ||
LEFT JOIN physiological_output_type USING (PhysiologicalOutputTypeID) | ||
LEFT JOIN Project ON ppf.ProjectID = Project.ProjectID | ||
WHERE ( | ||
ParameterTypeID = ( | ||
SELECT ParameterTypeID | ||
FROM parameter_type | ||
WHERE Name = 'RecordingDuration' | ||
) | ||
) | ||
-- AND OutputTypeName = 'raw' | ||
AND Project.showSummaryOnLogin = 1 | ||
GROUP BY Project.Name WITH ROLLUP |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
DROP TABLE IF EXISTS Login_Summary_Statistics; | ||
CREATE TABLE Login_Summary_Statistics ( | ||
Title VARCHAR(255), | ||
Project VARCHAR(255), | ||
Value INT, | ||
QueryOrder INT, | ||
PRIMARY KEY (Title, Project) | ||
); | ||
|
||
ALTER TABLE dataquery_study_queries_rel | ||
MODIFY COLUMN PinType enum('topquery','dashboard', 'loginpage') DEFAULT NULL; | ||
|
||
ALTER TABLE Project | ||
ADD COLUMN showSummaryOnLogin BOOLEAN DEFAULT TRUE; | ||
|
||
UPDATE Project SET showSummaryOnLogin = FALSE WHERE Name = 'DCP'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the show There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But this patch is going to the release patch, not raisinbread. Can you remove this RB specific line? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't drop tables in release patches. If something needs to be dropped (doesn't seem to be since it's created below), it should go in a cleanup patch.