Skip to content

Commit 3f8023b

Browse files
Document multi-column join conditions in Sync Streams (#395)
* Document multi-column join conditions in Sync Streams Generated-By: mintlify-agent * Improve composite key example --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Benita Volkmann <benita@journeyapps.com>
1 parent 1e7eafa commit 3f8023b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sync/supported-sql.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ Sync Streams support a subset of join syntax. The following rules define what is
270270
-- Valid: columns from one table
271271
SELECT comments.* FROM comments INNER JOIN issues ON comments.issue_id = issues.id
272272

273+
-- Valid: multiple equality conditions (composite keys)
274+
SELECT comments.* FROM comments, issues
275+
WHERE comments.issue_id = issues.id
276+
AND comments.region = issues.region
277+
AND issues.user_id = auth.user_id()
278+
273279
-- Invalid: columns from multiple tables
274280
SELECT comments.*, issues.title FROM comments JOIN issues ON comments.issue_id = issues.id
275281

0 commit comments

Comments
 (0)