SQL : PostgreSQL

  Aggregate Functions Like most other relational database products,  PostgreSQL  supports  aggregate functions . An aggregate function computes a single result from multiple input rows. For example, there are aggregates to compute the  count ,  sum ,  avg  (average),  max  (maximum) and  min  (minimum) over a set of rows. As an example, we can find the highest low-temperature reading anywhere with: SELECT max(temp_lo) FROM weather; max ----- 46 (1 row) If we wanted to know what city (or cities) that reading occurred in, we might try: SELECT city FROM weather WHERE temp_lo = max(temp_lo); WRONG but this will not work since the aggregate  max  cannot be used in the  WHERE  clause. (This restriction exists because the  WHERE  clause determines which rows will be included in the aggregate calculation; so obviously it has to be evaluated before aggregate functions are computed.) However, as is o...

Definitions

 

Data: A collection of facts


Data analysis: The collection, transformation, and organization of data in order to draw conclusions, make predictions, and drive informed decision-making


Data analyst: Someone who collects, transforms, and organizes data in order to drive informed decision-making


Data analytics: The science of data


Data-driven decision-making: Using facts to guide business strategy


Data ecosystem: The various elements that interact with one another in order to produce, manage, store, organize, analyze, and share data


Data science: A field of study that uses raw data to create new ways of modeling and understanding the unknown 


Dataset: A collection of data that can be manipulated or analyzed as one unit 


Comments

Popular posts from this blog

SQL : PostgreSQL

Using BigQuery / MySQL / other SQL

The R-versus-Python debate