-- create a table
CREATE TABLE VENTAS
(
  id_cliente INT not null,
  nom_nombre char(30) not null,
  departamento char(30) not null,
  monto INT not null,
  PRIMARY KEY(id_cliente)
);

INSERT INTO VENTAS
(id_cliente,nom_nombre,departamento,monto)
VALUES
(1,'Ana','Electronica','300'),
(2,'Carlos','Ropa','150'),
(3,'Ana','Electronica','400'),
(4,'Luis','Ropa','80'),
(5,'Carlos','Ropa','200');

SELECT departamento, AVG(monto) AS promedio
  FROM VENTAS
GROUP BY departamento
HAVING AVG(monto) >200;
select * from ventas ;

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: