with Data as (select V from MyTable where F1 = 100)select (select jsonb_agg(V) from Data) Total, (select jsonb_agg(V) from Data where V>1) Filtered;
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных