diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/core-06/core-06.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/core-06/core-06.1.query.sqlpp
new file mode 100644
index 0000000..f1466e5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/core-06/core-06.1.query.sqlpp
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Description: If two group by expressions would produce the
+ *            : same variable name then the first one wins and
+ *            : the second one gets an internal name.
+ *            : Test case when the first group by expression
+ *            : variable name is automatically generated
+ */
+
+from (
+  from range(1,2) as r1
+  select r1 as x
+) as i, (
+  from range(3,4) as r2
+  select r2 as x
+) as j
+group by i.x, j.x
+select
+  i.x as i_x,
+  j.x as j_x,
+  (i.x = x) as x_is_i_x,
+  count(*) as cnt
+order by x, j.x
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/core-06/core-06.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/core-06/core-06.2.query.sqlpp
new file mode 100644
index 0000000..9d6e08d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/core-06/core-06.2.query.sqlpp
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Description: If two group by expressions would produce the
+ *            : same variable name then the first one wins and
+ *            : the second one gets an internal name.
+ *            : Test case when the first group by expression
+ *            : variable name is specified in the query
+ */
+
+from (
+  from range(1,2) as r1
+  select r1 as x
+) as i, (
+  from range(3,4) as r2
+  select r2 as x
+) as j
+group by i.x * 2 - i.x as x, j.x
+select
+  i.x * 2 - i.x as i_x,
+  j.x as j_x,
+  (i.x * 2 - i.x = x) as x_is_i_x,
+  count(*) as cnt
+order by x, j.x
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/core-06/core-06.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/core-06/core-06.1.adm
new file mode 100644
index 0000000..4c081d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/core-06/core-06.1.adm
@@ -0,0 +1,4 @@
+{ "i_x": 1, "j_x": 3, "x_is_i_x": true, "cnt": 1 }
+{ "i_x": 1, "j_x": 4, "x_is_i_x": true, "cnt": 1 }
+{ "i_x": 2, "j_x": 3, "x_is_i_x": true, "cnt": 1 }
+{ "i_x": 2, "j_x": 4, "x_is_i_x": true, "cnt": 1 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/core-06/core-06.2.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/core-06/core-06.2.adm
new file mode 100644
index 0000000..4c081d5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/core-06/core-06.2.adm
@@ -0,0 +1,4 @@
+{ "i_x": 1, "j_x": 3, "x_is_i_x": true, "cnt": 1 }
+{ "i_x": 1, "j_x": 4, "x_is_i_x": true, "cnt": 1 }
+{ "i_x": 2, "j_x": 3, "x_is_i_x": true, "cnt": 1 }
+{ "i_x": 2, "j_x": 4, "x_is_i_x": true, "cnt": 1 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index ef94997..2c7452c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -4772,6 +4772,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="group-by">
+      <compilation-unit name="core-06">
+        <output-dir compare="Text">core-06</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="group-by">
       <compilation-unit name="sugar-01">
         <output-dir compare="Text">core-01</output-dir>
       </compilation-unit>
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
index 14a7ec0..6d2a0eb 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
@@ -19,21 +19,36 @@
 
 package org.apache.asterix.lang.sqlpp.rewrites.visitor;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.common.exceptions.ErrorCode;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
 import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
+import org.apache.asterix.lang.common.struct.VarIdentifier;
 import org.apache.asterix.lang.sqlpp.clause.Projection;
 import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
+import org.apache.asterix.lang.sqlpp.parser.ParseException;
+import org.apache.asterix.lang.sqlpp.util.ExpressionToVariableUtil;
 import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
 import org.apache.asterix.lang.sqlpp.visitor.base.AbstractSqlppExpressionScopingVisitor;
+import org.apache.hyracks.api.exceptions.SourceLocation;
 
-// Generates implicit column names for projections in a SELECT clause and group-by keys.
+/**
+ * <pre>
+ * 1. Generates implicit column names for projections in a SELECT clause,
+ * 2. Generates group by key variables if they were not specified in the query
+ * </pre>
+ */
 public class GenerateColumnNameVisitor extends AbstractSqlppExpressionScopingVisitor {
 
+    private final Set<VarIdentifier> gbyKeyVars = new HashSet<>();
+
     public GenerateColumnNameVisitor(LangRewritingContext context) {
         super(context);
     }
@@ -55,14 +70,25 @@
 
     @Override
     public Expression visit(GroupbyClause groupbyClause, ILangExpression arg) throws CompilationException {
+        gbyKeyVars.clear();
         for (GbyVariableExpressionPair gbyKeyPair : groupbyClause.getGbyPairList()) {
             if (gbyKeyPair.getVar() == null) {
-                VariableExpr varExpr = new VariableExpr(context.newVariable());
-                varExpr.setSourceLocation(gbyKeyPair.getExpr().getSourceLocation());
+                Expression gbyKeyExpr = gbyKeyPair.getExpr();
+                SourceLocation sourceLoc = gbyKeyExpr.getSourceLocation();
+                VariableExpr varExpr;
+                try {
+                    varExpr = ExpressionToVariableUtil.getGeneratedVariable(gbyKeyExpr, false);
+                } catch (ParseException e) {
+                    throw new CompilationException(ErrorCode.PARSE_ERROR, e, sourceLoc);
+                }
+                if (varExpr == null || gbyKeyVars.contains(varExpr.getVar())) {
+                    varExpr = new VariableExpr(context.newVariable());
+                }
+                varExpr.setSourceLocation(sourceLoc);
                 gbyKeyPair.setVar(varExpr);
             }
+            gbyKeyVars.add(gbyKeyPair.getVar().getVar());
         }
         return super.visit(groupbyClause, arg);
     }
-
 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index f817f17..7120686 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -3416,9 +3416,6 @@
         var = Variable()
         )?
         {
-            if(var==null){
-                var = ExpressionToVariableUtil.getGeneratedVariable(expr, false);
-            }
             GbyVariableExpressionPair pair1 = new GbyVariableExpressionPair(var, expr);
             vePairList.add(pair1);
         }
@@ -3431,9 +3428,6 @@
          var = Variable()
          )?
          {
-             if(var==null){
-                var = ExpressionToVariableUtil.getGeneratedVariable(expr, false);
-             }
              GbyVariableExpressionPair pair2 = new GbyVariableExpressionPair(var, expr);
              vePairList.add(pair2);
          }
