Skip to content

Commit 34aa757

Browse files
committed
fix: clarify example of correlated subqueries in documentation
1 parent 133100a commit 34aa757

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

learn-pr/wwl-data-ai/write-advanced-sql-code/includes/8-correlated-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ In the correlated example, the subquery references `p1.ProductCategoryID` from t
3535

3636
Correlated subqueries in the `WHERE` clause enable row-specific filtering conditions that would be impossible with static comparisons. Instead of comparing against a single fixed value, each row is evaluated against a dynamically calculated value based on that row's attributes.
3737

38-
This pattern is useful when you need to identify outliers within groups, find records that exceed their own category's threshold, or apply business rules that vary by context. The following example finds products priced above their category average, meaning a \$50 accessory might be flagged as expensive while a \$500 bike might not:
38+
This pattern is useful when you need to identify outliers within groups, find records that exceed their own category's threshold, or apply business rules that vary by context. The following example finds products priced above their category average, meaning a low-priced accessory might be flagged as expensive while a higher-priced bike might not:
3939

4040
```sql
4141
SELECT

0 commit comments

Comments
 (0)