Skip to content

Commit 66eaea5

Browse files
authored
Update improve_query.md (bregman-arie#418)
1 parent 9ac657e commit 66eaea5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

topics/sql/improve_query.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
1. Improve the following query
44

55
```
6-
SELECT count(*)
6+
SELECT COUNT(purchased_at)
77
FROM shawarma_purchases
8-
WHERE
9-
YEAR(purchased_at) == '2017'
8+
WHERE purchased_at BETWEEN '2017-01-01' AND '2017-12-31';
109
```

0 commit comments

Comments
 (0)