Hi Chris,
Maybe there is an another better solution;
1. sending values into jsonb_array_elements to getting elements (lateral
join)
2. distinct to eliminate duplicates
3. regexp_replace to remove malformed Array literals
4. Casting into text array
SELECT
count(distinct tags ),
string_to_array(r
if you want see account_status and the count()- try this:
SELECT
CASE
WHEN AND c.regdate > EXTRACT(epoch FROM (now() - INTERVAL '14 day'))
THEN 'trial'
WHEN last_pay > EXTRACT(epoch FROM (now() - INTERVAL '37 day'))
THEN 'paying'
END as account_status,
Have you tried with inner block and do nothing on exception;
BEGIN
..
BEGIN
UPDATE words_social
SET uid = out_uid
WHERE uid = ANY(_uids);
EXCEPTION WHEN OTHERS THEN
--do nothing or write NULL means do nothing