29What is a LATERAL join (CROSS APPLY), and when do you need it?▼hardSnowflakeAmazonMicrosoft1 replies◆ premiumA LATERAL join lets a FROM-clause subquery reference columns from the table ahead of it, which a normal join cannot. The signal is spotting the per-row use cases: top-N per group, table functions, unnesting arrays.Open full answer →
31What is the QUALIFY clause, and how does it simplify filtering on window functions?▼mediumSnowflakeDatabricksGoogle1 replies◆ premiumWHERE cannot reference a window function, so people resort to wrapping queries in subqueries. QUALIFY filters on window output directly. The signal is explaining why WHERE fails and writing top-N-per-group cleanly.Open full answer →