How May I extract this ternary operator in independent statement
You could do query.GroupBy(MyTernaryWrapperMethod) and declare that method as

string MyTernaryWrapperMethod(xVariableType x)
{
    if(x.ProductStatusId == ProductStatus.Sold || x.ProductStatusId == ProductStatus.OnHold) return "Delivered";

    if(x.ProductStatusId == ProductStatus.Shiped) return "Shiped";

    if(x.ProductStatusId == ProductStatus.NotAvailable) return "NotAvailable";

    if(x.ProductStatusId == ProductStatus.Paid) return "Paid";

    return "New"
}


But, that method seems to return something being an actual property of x. So maybe you should add a new method to x's type. Also it would be better to use swicth/case instead of those ifs:

public string ProductStatusName()
{
    switch (ProductStatusId)
    {
        case ProductStatus.Sold:
        case ProductStatus.OnHold: return "Delivered";
        case ProductStatus.Shiped: return "Shiped";
        case ProductStatus.NotAvailable: return "NotAvailable";
        case ProductStatus.Paid: return "Paid";
        default: return "New"
    }
}


And then you do:

var results = query.GroupBy(x =&gt; x.ProductStatusName()).Where(g =&gt; g.Key != "New")