plbuild/distributor_levels.pg.sql

14 lines
204 B
MySQL
Raw Normal View History

2023-09-13 17:06:57 -04:00
SELECT
dba
,folder
,jsonb_agg(DISTINCT plevel) plevs
FROM
rlarp.cust
WHERE
status = 'A'
AND COALESCE(plevel,'') <> ''
AND plevel !~ 'XXX'
GROUP BY
dba
,folder