From c2dea41f16a31242fcfb31c396db3e29738f1d58 Mon Sep 17 00:00:00 2001 From: Enis Afgan Date: Tue, 9 Jul 2024 16:47:29 +0200 Subject: [PATCH] Fix the query to count number of workflows --- parts/22-query.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parts/22-query.sh b/parts/22-query.sh index 88576fc..2226b6e 100644 --- a/parts/22-query.sh +++ b/parts/22-query.sh @@ -1846,7 +1846,7 @@ query_workflow-count() { ##? [date] : Count the number of workflow. $ gxadmin query workflow-count num_workflows --------------- - 471969 + 403101 (1 row) EOF @@ -1857,7 +1857,7 @@ query_workflow-count() { ##? [date] : Count the number of workflow. read -r -d '' QUERY <<-EOF SELECT - count(*) as num_workflows + count(distinct(uuid)) as num_workflows FROM workflow $where @@ -5381,7 +5381,7 @@ query_tools-usage-per-month() { ##? [--startmonth=-] [--endmonth=] [--short_tool_id] [ Tools Usage Tracking: cpu-hours, cpu-years and nb_users for specific tools (optionally in a given year). $ gxadmin query tools-usage --super_short_tool_id --no_version --tools bowtie2,Cut1 2023 - cpu_hours | cpu_years | tool_id | nb_users + cpu_hours | cpu_years | tool_id | nb_users -----------+-----------+---------+---------- - 4631.91 | 0.53 | bowtie2 | 7 - 0.24 | 0.00 | Cut1 | 6 - (2 rows) + 4631.91 | 0.53 | bowtie2 | 7 + 0.24 | 0.00 | Cut1 | 6 + (2 rows) EOF if [[ -n $arg_year ]]; then filter_by_year="AND date_trunc('year', job.create_time AT TIME ZONE 'UTC') = '$arg_year-01-01'::date"