Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
73429956
Commit
73429956
authored
Feb 29, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[METRICS] better formating
parent
38954975
Pipeline
#5684
canceled with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
corpora.sql
bin/metrics/corpora.sql
+1
-1
graphs.sql
bin/metrics/graphs.sql
+1
-1
phylo.sql
bin/metrics/phylo.sql
+1
-1
teams.sql
bin/metrics/teams.sql
+1
-1
users.sql
bin/metrics/users.sql
+1
-1
No files found.
bin/metrics/corpora.sql
View file @
73429956
...
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from nodes n where n.typename = 30)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
from
total
)
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
0D00
%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
99
%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
...
...
bin/metrics/graphs.sql
View file @
73429956
...
...
@@ -2,6 +2,6 @@ WITH total AS (SELECT * from nodes n where n.typename = 9)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
from
total
)
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
0D00
%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
99
%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
bin/metrics/phylo.sql
View file @
73429956
...
...
@@ -2,6 +2,6 @@ WITH total AS (SELECT * from nodes n where n.typename = 90)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
from
total
)
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
0D00
%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
99
%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
bin/metrics/teams.sql
View file @
73429956
...
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from nodes n where n.typename = 210)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
from
total
)
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
0D00
%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
99
%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
...
...
bin/metrics/users.sql
View file @
73429956
...
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from auth_user as A)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
from
total
)
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date_joined
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
0D00
%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm
99
%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment