Back to Browse

Part des ventes d'un produit - Exercice SQL

1.4K views
Feb 4, 2018
2:59

Nouvel exercice SQL où cette fois, on s'intéresse à la part des ventes d'un produit par mois. Amusez vous bien. Le script est ci-dessous : CREATE TABLE `commande` ( `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT , `date` DATETIME NOT NULL , `produit` INT NOT NULL , `montant` DECIMAL NOT NULL ) ; INSERT INTO `commande`(`date`, `produit`, `montant`) VALUES ('20171210',1,200), ('20171210',2,200), ('20171210',2,200), ('20171210',2,200), ('20171210',2,200), ('20171110',1,200), ('20171110',2,200), ('20171110',2,200), ('20171110',2,200), ('20180110',1,200), ('20180110',2,200), ('20180110',2,200), ('20180110',2,200), ('20180110',2,200), ('20180110',2,200), ('20180110',2,200), ('20180110',2,200);

Download

0 formats

No download links available.

Part des ventes d'un produit - Exercice SQL | NatokHD