Check for null columns in a table
From the wording of your question, I guess something like:

SELECT substr(agg_stmt,1,LENGTH(agg_stmt)-10) FROM (
    SELECT STRING_AGG(stmt, '') as agg_stmt FROM (
        SELECT 'SELECT ' || '''' || column_name 
            || ''' as col, COUNT(NULLIF(' || column_name || ','''')) as cnt FROM ' 
            || table_name || '' || ' union all ' as stmt
        FROM information_schema.columns
        WHERE table_name = 't'
    ) AS TT
) AS TTT;


should do. For a table T (x, y) it will generate a stmt like:

SELECT 'x' as col, COUNT(NULLIF(x,'')) as cnt FROM t union all SELECT 'y' as col, COUNT(NULLIF(y,'')) as cnt FROM t


You can add an outer stmt like:

SELECT col FROM (
    SELECT 'x' as col, COUNT(NULLIF(x,'')) as cnt FROM t 
    union all 
    SELECT 'y' as col, COUNT(NULLIF(y,'')) as cnt FROM t
) AS Q
WHERE cnt = 0


to get all columns that have only null or ''