devops-exercises/topics/sql/improve_query.md

10 lines
179 B
Markdown
Raw Normal View History

2021-08-13 08:23:50 +02:00
## Comparisons vs. Functions
1. Improve the following query
```
2023-08-24 21:56:22 +02:00
SELECT COUNT(purchased_at)
2021-08-13 08:23:50 +02:00
FROM shawarma_purchases
2023-08-24 21:56:22 +02:00
WHERE purchased_at BETWEEN '2017-01-01' AND '2017-12-31';
2021-08-13 08:23:50 +02:00
```