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
150
Issues
150
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
c94bc775
Commit
c94bc775
authored
Feb 29, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Metrics
parent
1a806995
Pipeline
#5681
canceled with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
corpora.sql
bin/metrics/corpora.sql
+2
-2
graphs.sql
bin/metrics/graphs.sql
+2
-2
phylo.sql
bin/metrics/phylo.sql
+2
-2
teams.sql
bin/metrics/teams.sql
+2
-2
users.sql
bin/metrics/users.sql
+2
-2
No files found.
bin/metrics/corpora.sql
View file @
c94bc775
WITH
total
AS
(
SELECT
*
from
nodes
n
where
n
.
typename
=
30
)
,
sum
AS
(
SELECT
count
(
*
)
from
total
)
,
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
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
)))
AS
"LAST 3 MONTHS / TOTAL"
(
SELECT
TO_CHAR
(((
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm00%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
...
...
bin/metrics/graphs.sql
View file @
c94bc775
WITH
total
AS
(
SELECT
*
from
nodes
n
where
n
.
typename
=
9
)
,
sum
AS
(
SELECT
count
(
*
)
from
total
)
,
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
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
)))
AS
"LAST 3 MONTHS / TOTAL"
(
SELECT
TO_CHAR
(((
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm00%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
bin/metrics/phylo.sql
View file @
c94bc775
WITH
total
AS
(
SELECT
*
from
nodes
n
where
n
.
typename
=
90
)
,
sum
AS
(
SELECT
count
(
*
)
from
total
)
,
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
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
)))
AS
"LAST 3 MONTHS / TOTAL"
(
SELECT
TO_CHAR
(((
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm00%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
bin/metrics/teams.sql
View file @
c94bc775
WITH
total
AS
(
SELECT
*
from
nodes
n
where
n
.
typename
=
210
)
,
sum
AS
(
SELECT
count
(
*
)
from
total
)
,
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
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
)))
AS
"LAST 3 MONTHS / TOTAL"
(
SELECT
TO_CHAR
(((
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm00%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
...
...
bin/metrics/users.sql
View file @
c94bc775
WITH
total
AS
(
SELECT
*
from
auth_user
as
A
)
,
sum
AS
(
SELECT
count
(
*
)
from
total
)
,
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
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
)))
AS
"LAST 3 MONTHS / TOTAL"
(
SELECT
TO_CHAR
((
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
)),
'fm00%'
)
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