treewide: Format with shellcheck, jsonlint and yamllint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
if [[ $# -ne 1 ]]
|
||||
then
|
||||
echo "Usage: $0 <file>.sql"
|
||||
exit 1
|
||||
@@ -8,11 +8,11 @@ fi
|
||||
|
||||
file=$1
|
||||
|
||||
if [ ! -e $file ]
|
||||
if [[ ! -e "${file}" ]]
|
||||
then
|
||||
echo "file $file does not exist"
|
||||
echo "file ${file} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat $file | kubectl -n analytics exec -i svc/prod-umami-db-rw -c postgres -- psql app
|
||||
kubectl -n analytics exec -i svc/prod-umami-db-rw -c postgres -- psql app < "${file}"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ GROUP BY
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FROM
|
||||
crosstab_integer_5_cols(
|
||||
'SELECT * FROM simulations
|
||||
WHERE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
select
|
||||
select
|
||||
s.distinct_id,
|
||||
count(distinct w.visit_id)
|
||||
from
|
||||
@@ -9,7 +9,7 @@ join
|
||||
where
|
||||
w.website_id = '16e7d807-4db5-45fd-92a9-27393445a153'
|
||||
and w.event_type = 1
|
||||
and w.created_at between '2025-10-13' and '2025-10-19'
|
||||
and w.created_at between '2025-10-13' and '2025-10-19'
|
||||
and s.distinct_id is not null
|
||||
and substring(s.distinct_id similar '%#"@%#"' escape '#') not in ('@oceanbox.io')
|
||||
group by
|
||||
|
||||
@@ -9,7 +9,7 @@ join
|
||||
where
|
||||
w.website_id = '16e7d807-4db5-45fd-92a9-27393445a153'
|
||||
and w.event_type = 1
|
||||
and w.created_at between '2025-10-06' and '2025-10-10'
|
||||
and w.created_at between '2025-10-06' and '2025-10-10'
|
||||
and s.distinct_id is not null
|
||||
and s.distinct_id like '%@%'
|
||||
group by
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FROM
|
||||
crosstab(
|
||||
'SELECT "group", sim_type, count::text FROM weekly_sim_submit_count_v2 ORDER BY 1, 2',
|
||||
'SELECT DISTINCT sim_type FROM weekly_sim_submit_count_v2 ORDER BY 1'
|
||||
|
||||
Reference in New Issue
Block a user