About: Having (SQL)

An Entity of Type: Thing, from Named Graph: http://dbpedia.org, within Data Space: dbpedia.org

A HAVING clause in SQL specifies that an SQL <a href="/wiki/Select_(SQL)" title="Select (SQL)">SELECT</a> statement must only return rows where aggregate values meet the specified conditions. HAVING and <a href="/wiki/Where_(SQL)" title="Where (SQL)">WHERE</a> are often confused by beginners, but they serve different purposes. WHERE is taken into account at an earlier stage of a query execution, filtering the rows read from the tables. If a query contains GROUP BY, rows from the tables are grouped and aggregated. After the aggregating operation, HAVING is applied, filtering out the rows that don't match the specified conditions. Therefore, WHERE applies to data read from tables, and HAVING should only apply to aggregated data, which isn't known in the initial stage of a query.

Property Value
dbo:abstract
  • A HAVING clause in SQL specifies that an SQL <a href="/wiki/Select_(SQL)" title="Select (SQL)">SELECT</a> statement must only return rows where aggregate values meet the specified conditions. HAVING and <a href="/wiki/Where_(SQL)" title="Where (SQL)">WHERE</a> are often confused by beginners, but they serve different purposes. WHERE is taken into account at an earlier stage of a query execution, filtering the rows read from the tables. If a query contains GROUP BY, rows from the tables are grouped and aggregated. After the aggregating operation, HAVING is applied, filtering out the rows that don't match the specified conditions. Therefore, WHERE applies to data read from tables, and HAVING should only apply to aggregated data, which isn't known in the initial stage of a query. To view the present condition formed by the GROUP BY clause, the HAVING clause is used. (en)
  • HAVING — необов'язковий параметр оператора <a href="/wiki/Select_(SQL)" title="Select (SQL)">SELECT</a> для зазначення умови на результат агрегатних функцій (MAX, SUM, AVG, …). <b>HAVING <умови></b> подібний до <b>WHERE <умови></b> за винятком того, що рядки відбираються не за значенням стовпців, а будуються зі значень стовпців вказаних в GROUP BY і значень агрегатних функцій, обчислених для кожної групи, утвореної GROUP BY. Якщо GROUP BY не використовується, HAVING поводить себе як WHERE. (uk)
dbo:wikiPageExternalLink
dbo:wikiPageID
  • 7079627 (xsd:integer)
dbo:wikiPageLength
  • 2500 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID
  • 1035100182 (xsd:integer)
dbo:wikiPageWikiLink
dbp:date
  • September 2020 (en)
dbp:wikiPageUsesTemplate
dcterms:subject
rdfs:comment
  • HAVING — необов'язковий параметр оператора <a href="/wiki/Select_(SQL)" title="Select (SQL)">SELECT</a> для зазначення умови на результат агрегатних функцій (MAX, SUM, AVG, …). <b>HAVING <умови></b> подібний до <b>WHERE <умови></b> за винятком того, що рядки відбираються не за значенням стовпців, а будуються зі значень стовпців вказаних в GROUP BY і значень агрегатних функцій, обчислених для кожної групи, утвореної GROUP BY. Якщо GROUP BY не використовується, HAVING поводить себе як WHERE. (uk)
  • A HAVING clause in SQL specifies that an SQL <a href="/wiki/Select_(SQL)" title="Select (SQL)">SELECT</a> statement must only return rows where aggregate values meet the specified conditions. HAVING and <a href="/wiki/Where_(SQL)" title="Where (SQL)">WHERE</a> are often confused by beginners, but they serve different purposes. WHERE is taken into account at an earlier stage of a query execution, filtering the rows read from the tables. If a query contains GROUP BY, rows from the tables are grouped and aggregated. After the aggregating operation, HAVING is applied, filtering out the rows that don't match the specified conditions. Therefore, WHERE applies to data read from tables, and HAVING should only apply to aggregated data, which isn't known in the initial stage of a query. (en)
rdfs:label
  • Having (SQL) (en)
  • Having (SQL) (ru)
  • Having (SQL) (uk)
owl:sameAs
prov:wasDerivedFrom
foaf:isPrimaryTopicOf
is dbo:wikiPageRedirects of
is dbo:wikiPageWikiLink of
is foaf:primaryTopic of
Powered by OpenLink Virtuoso    This material is Open Knowledge     W3C Semantic Web Technology     This material is Open Knowledge    Valid XHTML + RDFa
This content was extracted from Wikipedia and is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License