OK so I still believe that you can set the conditional in the advanced tab for each query
So SELECT * FROM "Test" ORDER BY "id" DESC;
will run when urlparams.userid == ""
and the other query SELECT * FROM "Test" WHERE "UserId" = {{ urlparams.userid }} ORDER BY "id" DESC;
should run urlparams.userid != ""
Both conditional set in Advanced Tab
and for each query you set it to run automatically when inputs change in the General Tab
In the Data field for that table, do the following {{urlparams.userid == ""?query1.data:query2.data}}
This checks to see if the userid is blank and if it is populate table with query1.data, but if it is not empty populate table with query2.data
You'll want to set up the separate queries to automatically run when inputs change.