Skip to content

Commit

Permalink
Update technical readme (#7248)
Browse files Browse the repository at this point in the history
Fix a wrong query, reported by @naisila
  • Loading branch information
onderkalaci authored Oct 6, 2023
1 parent 0dca65c commit 7d6c401
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/backend/distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,8 @@ WHERE orders_table.user_id = distinct_user_id;
#### Subquery in Target List

```sql
-- Sum of max price per product category, filtered by a subquery in the target list
SELECT
(SELECT MAX(price) FROM products_table p WHERE p.category = o.category),
COUNT(DISTINCT o.product_id)
FROM orders_table o, users_table u
WHERE o.user_id = u.user_id AND u.user_id IN
(SELECT user_id FROM special_users_table)
GROUP BY o.category;
-- retrieves the most recent order date for each user
SELECT (SELECT MAX(order_date) FROM orders_table o WHERE o.user_id = u.user_id) FROM users_table u;
```

#### Subquery in WHERE Clause
Expand Down

0 comments on commit 7d6c401

Please # to comment.