Reached here #1

Reached here #2

Reached here #3

Reached here #4


Warning: Parameter 1 to PlgSystemAdvancedModuleHelper::onRenderModule() expected to be a reference, value given in /home/factengi/public_html/libraries/joomla/event/dispatcher.php on line 165

Warning: Parameter 1 to PlgSystemAdvancedModuleHelper::onRenderModule() expected to be a reference, value given in /home/factengi/public_html/libraries/joomla/event/dispatcher.php on line 165

Warning: Parameter 1 to PlgSystemAdvancedModuleHelper::onRenderModule() expected to be a reference, value given in /home/factengi/public_html/libraries/joomla/event/dispatcher.php on line 165

Warning: Parameter 1 to PlgSystemAdvancedModuleHelper::onRenderModule() expected to be a reference, value given in /home/factengi/public_html/libraries/joomla/event/dispatcher.php on line 165
RETURN Clause

Loading color scheme


Notice: Undefined property: stdClass::$productnum in /home/factengi/public_html/modules/mod_vertical_menu/types/joomlacontent/menu.php on line 127
RETURN Clause

FactEngine Query Language (FEQL) has an optional RETURN clause which is analogous to SELECT and RETURN clauses in the SQL and Cypher query languages.

For example, the following FEQL query has a RETURN, GROUP BY and ORDER BY clause, for a query that returns the count of orders taken by employees in December 2017 in descending order, over a database that stores orders for products (the Northwind database by Microsoft):

Syntax - RETURN Clause

<RETURNCLAUSE> ::= RETURN <RETURNCOLUMN> [, <RETURNCOLUM]*

<RETURNCOLUMN> ::= (<STAR> | <MINMAXELEMENT> | <KEYWDCOUNTSTAR> <ASCLAUSE>? | <MODELELEMENTNAME> (<MODELELEMENTSUFFIX>? <PERIOD> (<COLUMNNAMESTR> (<PERIOD> <NODEMODIFIERFUNCTION>)? | <STAR>) <ASCLAUSE>?)?)

<BROPEN> ::= (

<BRCLOSE> ::= )

<KEYWDAS> ::= AS

<KEYWDMIN> ::= MIN

<KEYWDMAX> ::= MAX

<KEYWDDATE> ::= DATE

<KEYWDTIME> ::= TIME

<KEYWDMONTH> ::= MONTH

<KEYWDTOLOWER> ::= TOLOWER

<KEYWDTOUPPER> ::= TOUPPER

<KEYWDYEAR> ::= YEAR

<KEYWDAVG> ::= AVG

<KEYWDSUM> ::= SUM

<STAR> ::= *

<MINMAXELEMENT> ::=  (<KEYWDMIN> <BROPEN> <RETURNCOLUMN> <BRCLOSE> | <KEYWDMAX> <BROPEN> <RETURNCOLUMN> <BRCLOSE>)

<KEYWDCOUNTSTAR> ::= "COUNT(*)" 

<ASCLAUSE> ::= KEYWDAS COLUMNNAMESTR

<MODELELEMENTNAME> ::= @"(([A-Z0-9]+[_a-z\-0-9]+[ |_]*)+[_|\s]?)+"

<MODELELEMENTSUFFIX> ::= @"([0-9])+"

<PERIOD> ::= .

<COLUMNNAMESTR> ::= @"(([a-zA-Z0-9][_a-z0-9]+)+[_|\s]?)+"; 

<NODEMODIFIERFUNCTION> ::= (KEYWDDATE | KEYWDTIME | KEYWDMONTH | KEYWDTOLOWER | KEYWDTOUPPER | KEYWDYEAR | KEYWDAVG | KEYWDSUM | KEYWDMAX | KEYWDMIN)

<ASCLAUSE> ::= AS <COLUMNNAMESTR>

GROUP BY Clause

FactEngine Query Language (FEQL) has a GROUP BY clause analogous to the GROUP BY clause in SQL and Cypher query languages.

GROUP BY clauses may be used in conjunction with a RETURN clause which is analogous to SELECT and RETURN clauses in the SQL and Cypher query languages.

For example, the following FEQL query has a RETURN, GROUP BY and ORDER BY clause, for a query that returns the count of orders taken by employees in December 2017 in descending order, over a database that stores orders for products (the Northwind database by Microsoft):

Syntax - GROUP BY Clause

<GROUPBYCLAUSE> ::= <KEYWDGROUPBY> <GROUPBYRETURNCOLUMN> (<COMMA> <GROUPBYRETURNCOLUMN>)*

<GROUPBYRETURNCOLUMN> ::= <MODELELEMENTNAME> <MODELELEMENTSUFFIX>? <PERIOD> <COLUMNNAMESTR>

<COMMA> ::= ,

<KEYWDGROUPBY> ::= GROUP BY

<MODELELEMENTNAME> ::= @"(([A-Z0-9]+[_a-z\-0-9]+[ |_]*)+[_|\s]?)+"

<MODELELEMENTSUFFIX> ::= @"([0-9])+"

<PERIOD> ::= .

<COLUMNNAMESTR> ::= @"(([a-zA-Z0-9][_a-z0-9]+)+[_|\s]?)+"; 


See Also:
RETURN Clause

 

ORDER BY Clause

FactEngine Query Language (FEQL) has an ORDER BY clause analogous to the ORDER BY clause in SQL and Cypher query languages.

ORDER BY clauses may be used in conjunction with a RETURN clause which is analogous to SELECT and RETURN clauses in the SQL and Cypher query languages.

For example, the following FEQL query has a RETURN, GROUP BY and ORDER BY clause, for a query that returns the count of orders taken by employees in December 2017 in descending order, over a database that stores orders for products (the Northwind database by Microsoft):

Syntax - ORDER BY Clause

<ORDERBYCLAUSE> ::= <KEYWDORDERBY> <ORDERBYCOLUMN> (<COMMA> <ORDERBYCOLUMN>)*

<ORDERBYCOLUMN> ::= [<MODELELEMENTNAME> <MODELELEMENTSUFFIX>? <PERIOD> <COLUMNNAMESTR> | <KEYWDCOUNTSTAR>] [<KEYWDASC> | <KEYWDDESC>]?

<COMMA> ::= ,

<KEYWDCOUNTSTAR> ::= COUNT(*)

<KEYWDORDERBY> ::= ORDER BY

<MODELELEMENTNAME> ::= @"(([A-Z0-9]+[_a-z\-0-9]+[ |_]*)+[_|\s]?)+"

<MODELELEMENTSUFFIX> ::= @"([0-9])+"

<PERIOD> ::= .

<COLUMNNAMESTR> ::= @"(([a-zA-Z0-9][_a-z0-9]+)+[_|\s]?)+"; 


See Also:
RETURN Clause