Subquery (chapter summary)

Source: Internet
Author: User
1. Self-query refers to multiple small queries embedded in a complete query. According to different requirements, self-query can appear in any position of the query statement, but in from, where and having clauses are followed by many cases.


2. The results returned by the self-query are divided into four types: single-row Single-Column subquery, single-row multi-column subquery, multi-row Single-Column subquery, and multi-row multi-column subquery.


3. If the subquery returns multiple rows of Single-Column data, you can use in, any, and all for determination.


4. subqueries, restricted queries, multi-table queries, and statistical queries can be combined to complete complex query operations.


5. analytics functions facilitate data partitioning, sorting, and window separation, allowing you to perform statistical operations on data.


6. In addition to complex SQL statements, you can also use the functions of aggregate () and unaggregate.


7. Hierarchical operation statements can be used to display the hierarchical structure of specified data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.