Back to Materialize

General Syntax Table

doc/user/layouts/shortcodes/idiomatic-sql/general-syntax-table.html

1231.2 KB
Original Source
Idiomatic Materialize SQL Pattern
ANY() Equi-join condition***If no duplicates in the unnested field*** ```mzsql WITH my_expanded_values AS (SELECT UNNEST(array
mz_now() cannot be used with date/time operatorsRewrite the query expression; specifically, move the operation to the other side of the comparison.
mz_now() cannot be used with ORs in materialized/indexed view definitions and SUBSCRIBE statementsRewrite as UNION ALL or UNION, deduplicating as necessary:
  • In some cases, you may need to modify the conditions to deduplicate results when using UNION ALL. For example, you might add the negation of one input's condition to the other as a conjunction.
  • In some cases, using UNION instead of UNION ALL may suffice if the inputs do not contain other duplicates that need to be retained.

|