Add a table alias
This commit is contained in:
parent
af358193ca
commit
48ee47cdf6
|
@ -194,7 +194,7 @@ func (statement *Statement) GenCountSQL(beans ...interface{}) (string, []interfa
|
|||
}
|
||||
|
||||
if statement.GroupByStr != "" {
|
||||
sqlStr = fmt.Sprintf("SELECT %s FROM (%s)", selectSQL, sqlStr)
|
||||
sqlStr = fmt.Sprintf("SELECT %s FROM (%s) sub", selectSQL, sqlStr)
|
||||
}
|
||||
|
||||
return sqlStr, append(statement.joinArgs, condArgs...), nil
|
||||
|
|
Loading…
Reference in New Issue