I am retrieving some values via SQL (can't be NXQL), is there any way to show it in a UI?
I suggest you to use PGAdmin or your best SQL administration tool. This is not really safe to let Nuxeo expose a UI where he can produce SQL script...