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)