A discussion list in unlike a normal list in that it consists of two content types - a Discussion content type that maps to the discussion topic and a Message that maps to all replies to the topic. If you examine the Discussion content type you’ll see that its inherited from the Folder content type.
The reply contains a field called ‘ParentFolderId’ and as the name suggests it holds the ID of the discussion topic. So naturally if you were to do a query on the list for all items with the same ParentFolderId you would expect the query to work. However, since the topic is of a folder content type and the replies are contained within the ‘folder’ you would need to set the queries ViewAttributes property to "Scope='Recursive'" for it to return results.
Below is an example using the object model:
SPQuery query = new SPQuery();
query.ViewAttributes = "Scope='Recursive'";
StringBuilder queryString = new StringBuilder();
queryString.Append(" <Where>");
queryString.Append(" <And>");
queryString.Append(" <Eq>");
queryString.Append(" <FieldRef Name=\"ContentType\" />");
queryString.Append(" <Value Type=\"Text\">Message</Value>");
queryString.Append(" </Eq>");
queryString.Append(" <Eq>");
queryString.Append(" <FieldRef Name=\"ParentFolderId\" />");
queryString.Append(" <Value Type=\"Number\">99</Value>"); //NOTE: change this to the value you need
queryString.Append(" </Eq>");
queryString.Append(" </And>");
queryString.Append(" </Where>");
query.Query = queryString.ToString();
DataTable replyTable = discussionList.GetItems(query).GetDataTable();