# How to Join Two Collections with a SQL Derivation in Estuary

DevFeed: [How to Join Two Collections with a SQL Derivation in Estuary](<https://devfeed.tech/articles/how-to-join-two-collections-with-a-sql-derivation-in-estuary-82087.md>)

Original publisher: [Read original article](<https://estuary.dev/blog/derivations-join-collections-sql>)

Author: Dani Pálma

Published: 2024-09-26T20:48:12Z

Content type: tutorial

Language: en

Sources: [Estuary](<https://devfeed.tech/sources/estuary.md>)

Topics: [JOIN](<https://devfeed.tech/topics/join.md>), [Rockset](<https://devfeed.tech/topics/rockset.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [data-engineering](<https://devfeed.tech/topics/data-engineering.md>), [concatenation](<https://devfeed.tech/topics/concatenation.md>)

Tags: [count](<https://devfeed.tech/tags/count.md>), [data-engineering](<https://devfeed.tech/tags/data-engineering.md>), [derivations](<https://devfeed.tech/tags/derivations.md>), [estuary](<https://devfeed.tech/tags/estuary.md>), [join](<https://devfeed.tech/tags/join.md>), [snowflake](<https://devfeed.tech/tags/snowflake.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This tutorial shows how to define an Estuary SQL derivation that combines artist and album collections by artist_id, sums album plays, and keeps results updated as data arrives. It covers previewing the derivation with flowctl, publishing it, and materializing the output to Snowflake.

## Source excerpt

Learn to write and publish a SQL derivation in Estuary that joins two collections on artist_id, previews results with flowctl, and materializes to Snowflake.