In my code I have the following Linq Query:

```
IQueryable<Data> charts = (from report in ctx.Charts group report by new 
    { 
        Name = report.ChartTitle.ChartType.ChartCategory.CategoryName,
        id = report.ChartTitle.ChartType.ChartCategory.ChartCategoryId, 
        Period = report.Period 
    } into d
    select new Data
    {
        Name = d.Key.Name,
        Id = d.Key.id,
        Period = d.Key.Period,            
        Reports = from r in d group r by new 
        { Title = r.ChartTitle.Name, id = r.ChartTitle.ChartTitleId } into rs
        select new Report
        {
            Title = rs.Key.Title,
            Id = rs.Key.id,
            Charts = (from c in rs group c by new 
                    { 
                        ChartId = c.ChartId, 
                        FiscalYear = c.FiscalYear, 
                        ModifiedDate = c.ChartView.ModifiedDate, 
                        Function = c.Function.DisplayName, 
                        ChartData=c.ChartView.ViewData
                    } into cs
                    select new ChartInfo 
                    { 
                        ChartId = cs.Key.ChartId, 
                        FiscalYear = cs.Key.FiscalYear,
                        ModifiedDate = cs.Key.ModifiedDate, 
                        Function = cs.Key.Function, 
                        ChartData=cs.Key.ChartData 
                    })
    }});

```

In the above code if I exclude the "ChartData" field (which is of XML datatype), the query executes fine. But when ever I include this field it throws the following error :"The xml data type cannot be selected as DISTINCT because it is not comparable." 

Let me know what I am missing here?