             let t = try peekExpectedToken()
             if case ._var(_) = t {
                 node = try parseVar()
-                guard case .variable(let name, binding: _) = node else {
+                guard case .variable(_) = node else {
                     throw parseError("Expecting GROUP variable but got \(node)")
                 }
                 return node
             } else {
                 let expr = try parseBuiltInCall()
                 guard let c = freshCounter.next() else { fatalError("No fresh variable available") }
-                let name = ".\(c)"
+                let name = ".group-\(c)"
                 algebra = .extend(algebra, expr, name)
                 node = .variable(name, binding: true)
                 return node

                fatalError("DISTINCT aggregation is unimplemented")
            }
            let expr = try parseNonAggregatingExpression()
            fatalError("MIN aggregate is unimplemented")
            try expect(token: .rparen)
        case "MAX":
            try expect(token: .lparen)
            if try attempt(token: .keyword("DISTINCT")) {
                fatalError("DISTINCT aggregation is unimplemented")
            }
            let expr = try parseNonAggregatingExpression()
            fatalError("MAX aggregate is unimplemented")
            try expect(token: .rparen)
        case "AVG":
            try expect(token: .lparen)
            if try attempt(token: .keyword("DISTINCT")) {

        let dataset = try parseDatasetClauses() // TODO
        try attempt(token: .keyword("WHERE"))
        let ggp = try parseGroupGraphPattern()
        
        if star {
            
        }
        return ggp // TODO: wrap DESCRIBE so that it produces a set of triples
    }
    
