Some do support nesting (hierarchical).
If you wanted one query you could have one table that self references itself. Some RDMS support this concept. For example, with SQL Server one can user Common Table Expressions (CTEs) for a hierarchical query.
In your case the Posts would be at Level 0 and then all the comments would be at Level 1.
The other options are 2 queries or a Join with some extra information for every record returned (that others have mentioned).
Example of Hierarchical:
http://stackoverflow.com/questions/14274942/sql-server-cte-and-recursion-examplehttps://stackoverflow.com/questions/14274942/sql-server-cte-and-recursion-example
In the above link, EmpLevel show the level of the nesting (or hierarchy).