• The GROUP BY clause creates a grouping set and you can only select or order by properties of the grouping set. A grouping set has two kinds of properties defining properties and aggregate properties. Defining properties are true of each record within the set and aggregate properties are an amalgam of all the records in the set. You're trying to order by a property that is neither a defining property nor an aggregate. You either need to include that field in the group definition or use an aggregate, such as MIN() or MAX().

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA