I have two simple queries as following, which I fetch theme as two record(1 column) from PostgreSQL.
select count(*) from root.str union all select count(*) from back.str0 which returns something like this:
+===+ |103| +===+ |98 | +===+ But I'd like to have something like this:
+===+===+ |103|98 | +===+===+ I've tried this, but Postgres raises error at crosstab() function and says the function is not exist.
select * from crosstab( 'select count(*) from root.str union all select count(*) from back.str0'::text) as (int r,int e)
tablefuncmodule...? I can't remember from the top of my head how to do it, but I suspect there are answers on how to do it if you search the site.create extension tablefunc