Skip to content

Commit 6210b13

Browse files
committed
Change query for faster results
#55 (comment)
1 parent b76ef8b commit 6210b13

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/user-defined-functions/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ FROM InternationalSalesRecordTable;
472472

473473
You should start seeing results with both a `unit_cost` field and an `iso_unit_cost` field containing the output of our UDF!
474474

475-
We can also use the UDF in more complex queries e.g. to filter for records with a specific currency and quantity:
475+
We can also use the UDF in more complex queries e.g. to filter for records with specific currencies and quantities:
476476

477477
```sql
478478
SELECT
@@ -491,7 +491,7 @@ SELECT
491491
FROM InternationalSalesRecordTable
492492
)
493493
WHERE
494-
RIGHT(iso_unit_cost, 3) = 'EUR' AND quantity > 1;
494+
quantity > 1 AND RIGHT(iso_unit_cost, 3) NOT IN ('MNT', 'ERR');
495495
```
496496

497497
> Note: This query might take a while to return results, since there are many currencies used in the data!

0 commit comments

Comments
 (0)