fix STEG kiss projects selection

This commit is contained in:
Helmut Merz 2025-09-29 08:58:12 +02:00
parent c823a9c2af
commit fbc3893adb

View file

@ -1,6 +1,7 @@
set search_path to kiss, public; set search_path to kiss, public;
\a \C \t \f ; --\a
\C \t \f ;
\o ../data/projects_passiv.csv \o ../data/projects_passiv.csv
select m2.trackid id1 , m1.trackid idx, m1.data->>'community' Gemeinde, m1.item Projekt, select m2.trackid id1 , m1.trackid idx, m1.data->>'community' Gemeinde, m1.item Projekt,
@ -14,7 +15,7 @@ where m1.domain='kiss' and m1.class='project'
and m2.trackid = (select min(trackid) from messages m3 and m2.trackid = (select min(trackid) from messages m3
where m3.domain = m1.domain and m3.action = m1.action where m3.domain = m1.domain and m3.action = m1.action
and m3.class = m1.class and m3.item = m1.item and m3.class = m1.class and m3.item = m1.item
and m3.data->>'projectState' = m1.data->>'projectState') and (m3.data->>'projectState')::integer in (30, 40))
order by m1.data->>'community', m1.item order by m1.data->>'community', m1.item
--limit 20 --limit 20
--\g ../data/projects_passiv.csv --\g ../data/projects_passiv.csv