Create a function that can show a table result from select