Menu

SQL WINDOW FUNCTIONS, JOINS, CTES AND SUBQUERRIES.
📰

SQL WINDOW FUNCTIONS, JOINS, CTES AND SUBQUERRIES.

DEV Community: database·Austin karianjahi·1 day ago
#jI8BLJKt
#devtodatabase#devto#dev#basic#multiple
Reading 0:00
15s threshold

Introduction

SQL (Structured Query Language) is one of the most important tools used by data analysts to retrieve, organize, transform, and analyze data stored in relational databases. PostgreSQL is a powerful open source relational database management system that supports advanced SQL features for solving real-world business problems.

This guide covers four skills that take you from basic queries to real analysis in PostgreSQL: window functions, joins, common table expressions (CTEs) and subqueries.

1. SQL Window Functions

A window function performs a calculation across a group of related rows while retaining the individual rows in the output.

Imagine that a hospital manager wants to rank hospital visits according to their total bills. A normal aggregation could calculate the total or average bill, but it might combine multiple visits into one result.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.