title

text

Bruce Momjian
Bruce Momjian EnterpriseDB
14:00 05 February
180 мин

Exploring Common Table Expressions and Window Functions

Developers are often challenged to deliver results that are hard to implement using simple SQL queries. Fortunately, complex SQL capabilities exist in the SQL standards — common table expressions and window functions.

SQL is a declarative language, meaning the user submits an SQL command and the database determines the optimal execution. Common Table Expressions (CTEs) allow queries to be more imperative, allowing looping and processing hierarchical structures that are normally associated only with imperative languages.

Normal SQL queries return rows where each row is independent of the other returned rows. SQL window functions allow queries to return computed columns based on values in other rows in the result set.

This tutorial will help developers use CTE queries in their applications and allow operations that normally could only be done in application code to be done via SQL queries. It also explains the many window function facilities and how they can be used to produce useful SQL query results.

Video

Part I «Programming the SQL Way with CTE»


Part II «Postgres Window Magic»


Слайды

Другие доклады

  • Alexander Korotkov
    Alexander Korotkov Postgres Professional
    45 мин

    Credereum – blockchain-enabled Postgres

    Bringing the provability and immutability of blockchain to performance and efficiency of traditional DBMS.

    Blockchain technology has several unique properties including provability and immutability. Every blockchain transaction is signed by its author, and it could be verified by any blockchain network member. Also, once data is stored in blockchain, it can't be altered in the future. Many databases operating traditional DBMS would also benefit from provability and immutability properties. However, inclusion of all the transaction data in the public blockchain is very expensive.

    Credereum is the platform, which allows creation and maintaining of databases, whose contents and history are provable and immutable without sacrifice the performance and efficiency of traditional DBMS. Thanks to Credereum, database owner can prove the validity of query results, while users can verify them. Database owner don't have to reveal the whole database contents or full history of transactions to provide the proof of database query results. Therefore, Credereum database may contain private sensitive information. Credereum utilized bleeding-edge technologies including, but not limited to decentralized cloud, public blockchain with sharding. Credereum is an emerging technology of trusted and private databases.

    We will explain why PostgreSQL is suitable database for Credereum and what we need to develop in Postgres to support signed transactions and cryptographic storage.

  • Дмитрий Шитов
    Дмитрий Шитов ООО "ЦТП"
    22 мин

    How I Met Your Linux

    What is a real cost of not paying for Windows for 1C-user? Is there life without COM? Addressing and other issues for the bunch of PostgreSQL. Scheduling disk resources. How to overcome OS CentOS crash.

  • N
    Nik Larin Microsoft
    45 мин

    Azure Database for PostgreSQL - Global scalable managed cloud service

    Azure Database for PostgreSQL is a managed database service built for developers using the community PostgreSQL database technology you love. Learn how you can leverage the managed service and the key capabilities that the service offers which enables you as a developer to focus on developing apps. Using customer stories and experiences including live demos, we will walk through best practices and demonstrate how this service integrates with the other Azure services.

  • Teodor Sigaev
    Teodor Sigaev Postgres Professional
    Oleg Bartunov
    Oleg Bartunov Postgres Professional
    Alexander Korotkov
    Alexander Korotkov Postgres Professional
    45 мин