SQL query Beginner's Guide reading notes (ii) Creating SQL queries

Source: Internet
Author: User

Partii:sql Basics

CHAPTER 4Creating a simple Query


describes a way to create SQL the technology of the statement -- "Request/translation/clean up/sql "

The SELECT operationin SQL can broken down into three smaller operations,

Which we'll referto as the select statement,the Select expression,

and the SelectQuery.

The first layer contains one layer , nesting with each other , can form a very complex SELECT.


SELECT Statement Other keywords are more familiar with , Here's a little explanation . GROUP by and the having

GROUP By-when youuse Aggregate functions in the SELECT clause

To produce summaryinformation, your use of the GROUP by clause to

Divide theinformation into distinct groups. Your Database system uses

Any column or listof columns following the GROUP by keywords as

Grouping columns. The GROUP by clause is optional, and we ' ll examine

It further inchapter, Grouping Data.

Having-the Havingclause Filters The result of aggregate functions

In Groupedinformation. It's similar to the WHERE clause

have keyword isfollowed by a expression that evaluates to True,

False, Orunknown. You can test the expression by using standard comparison

Operators, booleanoperators, or special operators. Have is

Also an optionalclause, and we'll take a closer look at the it in Chapter 14,

Filtering Groupeddata.


SQL query Beginner's Guide reading notes (ii) Creating SQL queries

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.