Update improve_query.md
diff --git a/topics/sql/improve_query.md b/topics/sql/improve_query.md
index 0891a5c76..8819445d5 100644
--- a/topics/sql/improve_query.md
+++ b/topics/sql/improve_query.md
@@ -3,8 +3,7 @@
 1. Improve the following query
 
 ```
-SELECT count(*)
+SELECT COUNT(purchased_at)
 FROM shawarma_purchases
-WHERE
-  YEAR(purchased_at) == '2017'
+WHERE purchased_at BETWEEN '2017-01-01' AND '2017-12-31';
 ```
