5
One problem is that you can't use Smarty tags in a custom block (a block created through the Control Panel Blocks Administration page).
If you want that kind of info in a custom block, as opposed to a block associated with a module, I think the only way is to make the block's content type PHP, and then use PHP to do the database query to fetch the desired data and display it.
Alternatively, you could add a new block to the module that "owns" the data, i.e., "hack" the module. Then the block would have its own PHP code and associated Smarty template.