How to get query results in a plain text table