# select string_agg(x->>'letter', ' ') from (select jsonb_array_elements(tiles) from words_moves where gid=656 and action='play' order by played desc limit 5) x; ERROR: 42883: operator does not exist: record ->> unknown LINE 1: select string_agg(x->>'letter', ' ') from (select jsonb_arra... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. LOCATION: op_error, parse_oper.c:728