PostgreSQL Source - Run Functions Then SELECT from table

I want to know if this is possible. I created a QUESTION in Metabase.
The first two are functions that generate data and populate a table.
I want to return the results that are populated. Currently the functions run successfully.
No data returned from 3rd statement. No errors.

--CREATES TABLE
select fun_merchantsumm('2022-01-01','2022-04-01');

--POPULATES TABLE
select fun_merchantsumm_merchants('Lend Home Improvement','2022-01-01','2022-04-01');

--RETURNS RECORD SET
select * from sponsordata_merchantsummaries;

Hi @JTaylor_Momnt
Metabase does not support multi-statement queries:
https://github.com/metabase/metabase/issues/4050 - upvote by clicking :+1: on the first post

1 Like

Thank you.

Any reason you can't just create one Postgres function to do the whole thing?

select my_big_merchantsumm('Lend Home Improvement','2022-01-01','2022-04-01');

then that function calls the other two and returns the recordset?