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
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
82a333db
Commit
82a333db
authored
Feb 29, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] If no activity then null
parent
73429956
Pipeline
#5685
passed with stages
in 98 minutes and 20 seconds
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 @
82a333db
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from nodes n where n.typename = 30)
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from nodes n where n.typename = 30)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
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
))
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
NULLIF
((
SELECT
*
from
increase
),
0
)
/
NULLIF
((
SELECT
*
from
sum
),
0
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
FROM
sum
...
...
bin/metrics/graphs.sql
View file @
82a333db
...
@@ -2,6 +2,6 @@ WITH total AS (SELECT * from nodes n where n.typename = 9)
...
@@ -2,6 +2,6 @@ WITH total AS (SELECT * from nodes n where n.typename = 9)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
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
))
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
NULLIF
((
SELECT
*
from
increase
),
0
)
/
NULLIF
((
SELECT
*
from
sum
),
0
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
FROM
sum
bin/metrics/phylo.sql
View file @
82a333db
...
@@ -2,6 +2,6 @@ WITH total AS (SELECT * from nodes n where n.typename = 90)
...
@@ -2,6 +2,6 @@ WITH total AS (SELECT * from nodes n where n.typename = 90)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
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
))
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
NULLIF
((
SELECT
*
from
increase
),
0
)
/
NULLIF
((
SELECT
*
from
sum
),
0
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
FROM
sum
bin/metrics/teams.sql
View file @
82a333db
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from nodes n where n.typename = 210)
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from nodes n where n.typename = 210)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
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
))
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
NULLIF
((
SELECT
*
from
increase
),
0
)
/
NULLIF
((
SELECT
*
from
sum
),
0
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
FROM
sum
...
...
bin/metrics/users.sql
View file @
82a333db
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from auth_user as A)
...
@@ -2,7 +2,7 @@ WITH total AS (SELECT * from auth_user as A)
,
sum
AS
(
SELECT
count
(
*
)
AS
"TOTAL"
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
))
,
increase
AS
(
SELECT
count
(
*
)
from
total
as
t
WHERE
t
.
date_joined
>=
date_trunc
(
'month'
,
current_date
-
interval
'3'
month
))
SELECT
*
,
SELECT
*
,
(
SELECT
TO_CHAR
((
ROUND
(
100
*
(
SELECT
*
from
increase
)
/
(
SELECT
*
from
sum
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
(
SELECT
TO_CHAR
((
ROUND
(
100
*
NULLIF
((
SELECT
*
from
increase
),
0
)
/
NULLIF
((
SELECT
*
from
sum
),
0
))),
'fm99%'
)
AS
"CREATED LAST 3 MONTHS"
)
FROM
sum
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