USE jugos_ventas;
SELECT DNI, COUNT(DNI) AS NRO_COMPRAS FROM facturas
WHERE YEAR(FECHA_VENTA) = '2016'
GROUP BY DNI
HAVING NRO_COMPRAS > 2000;
USE jugos_ventas;
SELECT DNI, COUNT(DNI) AS NRO_COMPRAS FROM facturas
WHERE YEAR(FECHA_VENTA) = '2016'
GROUP BY DNI
HAVING NRO_COMPRAS > 2000;
USE jugos_ventas;
SELECT DNI, COUNT(DNI) AS NRO_COMPRAS FROM facturas
WHERE YEAR(FECHA_VENTA) = '2016'
GROUP BY DNI
HAVING NRO_COMPRAS > 2000;