- 查询某个时间段内的销售数据
SELECT * FROM sales WHERE sale_date BETWEEN '2021-01-01' AND '2021-12-31';
- 查询某个价格范围内的产品信息
SELECT * FROM products WHERE price BETWEEN 10 AND 50;
- 查询某个年龄段的客户信息
SELECT * FROM customers WHERE age BETWEEN 18 AND 30;
- 查询某个数量范围内的库存信息
SELECT * FROM inventory WHERE quantity BETWEEN 100 AND 500;