Tengo dos tablas
Ventas:
CREATE TABLE `ventas` (
`id_venta` int(11) NOT NULL,
`id_usuario` int(11) NOT NULL,
`fecha` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `ventas` (`id_venta`, `id_usuario`, `fecha`) VALUES
(1, 2, '2020-04-25 06:33:56'),
(2, 2, '2020-03-21 15:33:56'),
(3, 2, '2020-02-28 15:33:56'),
(4, 3, '2020-02-03 15:33:56'),
(5, 3, '2020-01-07 15:33:56'),
(6, 4, '2020-05-25 15:33:56'),
(7, 4, '2020-04-27 15:33:56'),
(8, 5, '2020-03-16 15:33:56'),
(9, 5, '2017-12-05 15:33:56'),
(10, 6, '2020-01-15 15:33:56'),
(11, 7, '2019-11-09 15:33:56'),
(12, 7, '2019-10-05 15:33:56'),
(13, 7, '2020-05-12 15:33:56'),
(14, 7, '2020-01-28 15:33:56'),
(15, 8, '2020-03-01 15:33:56'),
(16, 9, '2020-04-17 15:33:56'),
(17, 10, '2020-02-09 15:33:56'),
(18, 11, '2019-11-05 15:33:56'),
(19, 11, '2020-02-12 15:33:56'),
(20, 11, '2020-03-21 15:33:56'),
(21, 11, '2020-03-21 15:33:56'),
(22, 11, '2020-04-26 15:33:56'),
(23, 1, '2020-05-05 15:33:56'),
(24, 2, '2020-05-05 21:40:58');
Detalle ventas:
CREATE TABLE `detalle_ventas` (
`id_venta` int(11) NOT NULL,
`id_producto` int(11) NOT NULL,
`precio` double NOT NULL,
`cantidad` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `detalle_ventas` (`id_venta`, `id_producto`, `precio`, `cantidad`) VALUES
(1, 2, 18000.9, 1),
(1, 4, 4898.99, 1),
(1, 1, 40000, 2),
(2, 3, 25000, 1),
(3, 4, 4898.99, 1),
(4, 6, 12000, 1),
(4, 8, 7000, 2),
(4, 11, 5400, 1),
(5, 14, 560, 1),
(6, 10, 2300.56, 3),
(6, 13, 230, 2),
(6, 12, 300, 1),
(7, 16, 17000, 1),
(8, 4, 4898.99, 3),
(8, 1, 40000, 3),
(8, 9, 1000, 1),
(8, 10, 2300.56, 2),
(8, 15, 430, 2),
(9, 3, 25000, 1),
(10, 3, 25000, 4),
(11, 6, 12000, 2),
(12, 1, 40000, 1),
(13, 14, 560, 1),
(14, 4, 4898.99, 5),
(15, 7, 3000, 3),
(15, 9, 1000, 1),
(15, 13, 230, 1),
(15, 11, 5400, 1),
(15, 12, 300, 2),
(16, 13, 230, 1),
(17, 6, 12000, 1),
(17, 15, 430, 2),
(18, 8, 7000, 2),
(18, 7, 3000, 2),
(19, 2, 18000.9, 1),
(20, 4, 4898.99, 1),
(21, 12, 300, 2),
(21, 8, 7000, 1),
(22, 10, 2300.56, 1),
(22, 14, 560, 2),
(23, 5, 17, 5),
(23, 5, 17, 3),
(24, 2, 18000.9, 1);
Necesito hacer tres select, uno que filtre las ventas por día, otro por semana y otro por un mes específicos. Que me de como resultado cantidad y precio total de las ventas por el dia, la semana o mes especificos que les di.
Hasta ahora llevo esta sentencia que me da las ventas y el total de ellas pero no se me ocurre como filtrarla.
SELECT
v.id_venta,
COUNT(d.id_venta) AS cantidad,
SUM(d.cantidad * d.precio),
v.fecha AS f
FROM ventas v
INNER JOIN detalle_ventas d
ON d.id_venta = v.id_venta
GROUP BY f
ORDER BY fecha ASC;
Estoy usando MySQL