public QueryTotals(
            DataStorage storage,
            string columns,
            string condition,
            object[] args,
            string groupBy)
        {
            this.FStorage = storage;
            SqlUtils.Navigation navigation = new SqlUtils.Navigation(this.FStorage.Class);
            this.FSql.Append("SELECT ");
            navigation.ReplaceCompoundIdentifiers(columns, this.FSql);
            StringBuilder dest1 = new StringBuilder();

            navigation.ReplaceCompoundIdentifiers(condition, dest1);
            StringBuilder dest2 = new StringBuilder();

            navigation.ReplaceCompoundIdentifiers(groupBy, dest2);
            this.FSql.Append(' ');
            navigation.AppendFromSection(this.FSql);
            if (dest1.Length > 0)
            {
                this.FSql.Append(" WHERE ");
                this.FSql.Append(dest1.ToString());
            }
            if (dest2.Length > 0)
            {
                this.FSql.Append(" GROUP BY ");
                this.FSql.Append(dest2.ToString());
            }
            SqlUtils.ConvertObjectsToInDbParams(args, out this.FSqlParamTypes, out this.FSqlParamValues);
        }