Wanjia Huang

西南交通大学 软件工程

0%

CMU15445-02-AdvancedSQL

词汇:

case sensitive 区分大小写

quote 引号

aggregation 聚合

SQL:Structured Query Language

The language is comprised(包含、组成) of different classes(类) of commands

  1. DML:Data Manipulation Language

    1. SELECT, INSERT, UPDATE, and DELETE statements
  2. DDL:Data Definition Language

    1. Schema definitions for tables, indexes, views, and other objects.
  3. DCL:Data Control Language (DCL)

    1. Security, access controls.

聚合函数

An aggregation function takes in a bag of tuples as its input and then produces a single scalar value as its output. Aggregate functions can (almost) only be used in a SELECT output list.

• AVG(COL): The average of the values in COL

• MIN(COL): The minimum value in COL

• MAX(COL): The maximum value in COL

• COUNT(COL): The number of tuples in the relation