• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/sqlite3/

Lines Matching refs:GROUP

4936 ** or in an ORDER BY or GROUP BY clause.</dd>)^
13377 ** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.
18495 #define WHERE_GROUPBY 0x0040 /* pOrderBy is really a GROUP BY */
18642 ExprList *pGroupBy; /* The GROUP BY clause */
18667 #define SF_Aggregate 0x0000008 /* Contains agg functions or a GROUP BY */
19322 ExprList *pGroupBy; /* GROUP BY clause */
30120 case TK_GROUP: zExclude = "GROUP"; break;
99122 ** The ability to use an output result-set column in the WHERE, GROUP BY,
99822 ** a SELECT statement. pE is a term in an ORDER BY or GROUP BY clause.
99917 ** Generate an ORDER BY or GROUP BY term out-of-range error.
99921 const char *zType, /* "ORDER" or "GROUP" */
100054 ** Check every term in the ORDER BY or GROUP BY clause pOrderBy of
100066 ExprList *pOrderBy, /* The ORDER BY or GROUP BY clause to be processed */
100067 const char *zType /* "ORDER" or "GROUP" */
100124 ** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
100126 ** "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
100144 ExprList *pOrderBy, /* An ORDER BY or GROUP BY clause to resolve */
100145 const char *zType /* Either "ORDER" or "GROUP", as appropriate */
100211 ExprList *pGroupBy; /* The GROUP BY clause */
100306 /* If there are no aggregate functions in the result-set, and no GROUP BY
100318 /* If a HAVING clause is present, then there must be a GROUP BY clause.
100321 sqlite3ErrorMsg(pParse, "a GROUP BY clause is required before HAVING");
100349 /* The ORDER BY and GROUP BY clauses may not refer to terms in
100386 /* Resolve the GROUP BY clause. At the same time, make sure
100387 ** the GROUP BY clause does not contain aggregate functions.
100392 if( resolveOrderGroupBy(&sNC, p, pGroupBy, "GROUP") || db->mallocFailed ){
100398 "the GROUP BY clause");
102819 /* Check if pExpr is identical to any GROUP BY term. If so, consider
102848 ** a "group". The requirement that the GROUP BY term must be BINARY
102852 ** GROUP BY be BINARY is stricter than necessary. It would also work
102854 ** sequence as the GROUP BY term, but that is much harder to check,
102857 ** GROUP BY to use the BINARY collating sequence.
103066 assert( p->pGroupBy==0 ); /* Has no GROUP BY clause */
110482 ** zSql1: SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx
110614 "SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx",
122728 ** and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and
124906 return 0; /* SELECT may not have a GROUP BY clause */
131190 ** the ORDER BY (or GROUP BY) clause of query is being coded.
131208 ExprList *pOrderBy; /* The ORDER BY (or GROUP BY clause) */
131284 ExprList *pGroupBy, /* the GROUP BY clause */
132514 ** If the ExprList is an ORDER BY or GROUP BY clause then the resulting
132570 ** where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which
135704 ** a GROUP BY clause. But such a HAVING clause is also harmless
136991 ** SELECT * FROM <tables> WHERE a=? GROUP BY b HAVING b=? AND c=?
136995 ** SELECT * FROM <tables> WHERE a=? AND b=? GROUP BY b HAVING c=?
136998 ** entirely of constants and expressions that are also GROUP BY terms that
137076 ** * There is no WHERE or GROUP BY or HAVING clauses on the subqueries
137174 ExprList *pGroupBy; /* The GROUP BY clause. May be NULL */
137607 ** can be rewritten as a GROUP BY. In other words, this:
137613 ** SELECT xyz FROM ... GROUP BY xyz ORDER BY xyz
137636 SELECTTRACE(0x400,pParse,p,("Transform DISTINCT into GROUP BY:\n"));
137697 /* No aggregate functions and no GROUP BY clause */
137770 /* This case when there exist aggregate functions or a GROUP BY clause
137773 int iAMem; /* First Mem address for storing current GROUP BY */
137774 int iBMem; /* First Mem address for previous GROUP BY */
137779 int groupBySort; /* Rows come from source in GROUP BY order */
137783 int orderByGrp = 0; /* True if the GROUP BY and ORDER BY are the same */
137786 ** GROUP BY clause.
137801 /* If there is both a GROUP BY and an ORDER BY clause and they are
137803 ** on the grounds that the GROUP BY will cause elements to come out
137804 ** in the correct order. It also may not - the GROUP BY might use a
137807 ** ORDER BY and GROUP BY clauses are the same by setting the orderByGrp
137811 /* The GROUP BY processing doesn't care whether rows are delivered in
137813 ** So set the ASC/DESC flags in the GROUP BY to match those in the
137910 /* Processing for aggregates with GROUP BY is very different and
137911 ** much more complex than aggregates without a GROUP BY.
137924 /* If there is a GROUP BY clause we might need a sorting index to
137936 /* Initialize memory locations used by GROUP BY aggregate processing
137952 /* Begin a loop that will extract all source rows in GROUP BY order.
137983 "DISTINCT" : "GROUP BY");
138018 VdbeComment((v, "GROUP BY sort")); VdbeCoverage(v);
138022 /* If the index or temporary table used by the GROUP BY sort
138036 /* Evaluate the current GROUP BY terms and store in b0, b1, b2...
138038 ** Then compare the current GROUP BY terms against the GROUP BY terms
138059 /* Generate code that runs whenever the GROUP BY changes.
138060 ** Changes in the GROUP BY are detected by the previous code
138066 ** for the next GROUP BY batch.
138137 } /* endif pGroupBy. Begin aggregate queries without GROUP BY: */
138225 /* This case runs if the aggregate has no GROUP BY clause. The
140084 ** GROUP BY <other-columns>
140087 ** If pTab is a view, the GROUP BY clause is omitted.
152022 ** (or GROUP BY) without requiring a separate sort operation. Return N:
152029 ** strict. With GROUP BY and DISTINCT the only requirement is that
152030 ** equivalent rows appear immediately adjacent to one another. GROUP BY
152032 ** as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT
152038 ExprList *pOrderBy, /* ORDER BY or GROUP BY or DISTINCT clause to check */
152283 ** Sort order is irrelevant for a GROUP BY clause. */
152352 ** the planner assumes that the specified pOrderBy list is actually a GROUP
152370 ** SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1
152371 ** SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0
153043 ** pOrderBy is a pointer to the ORDER BY clause (or the GROUP BY clause
153060 ExprList *pOrderBy, /* An ORDER BY (or GROUP BY) clause, or NULL */
153093 /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
153980 ** * FROM, WHERE, GROUP BY and HAVING clauses are all moved to
158337 0, /* GROUP => nothing */
158608 /* 145 */ "GROUP",
158927 /* 141 */ "groupby_opt ::= GROUP BY nexprlist",
159115 /* 329 */ "frame_exclude ::= GROUP|TIES",
159833 244, /* (141) groupby_opt ::= GROUP BY nexprlist */
160021 315, /* (329) frame_exclude ::= GROUP|TIES */
160236 -3, /* (141) groupby_opt ::= GROUP BY nexprlist */
160424 -1, /* (329) frame_exclude ::= GROUP|TIES */
161080 case 141: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==141);
161873 case 329: /* frame_exclude ::= GROUP|TIES */
162705 ** 74: GROUP INDEX
162856 testcase( i==73 ); /* GROUP */
180562 " GROUP BY level HAVING cnt>=?"