CREATE TABLE X
(city varchar (10),
type varchar (10),
cost int,
reportdate date);
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Peach',690,'31-03-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Peach',95,'01-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Peach',50,'02-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Apple',538,'31-03-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Apple',303,'01-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Apple',836,'02-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Pinapple',137,'31-03-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Pinapple',849,'02-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Paris','Pinapple',900,'03-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Peach',20,'31-03-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Peach',255,'01-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Peach',706,'02-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Apple',284,'31-03-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Apple',958,'01-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Melon',790,'02-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Pinapple',535,'01-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Pinapple',29,'04-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
('Lyon','Pinapple',610,'06-04-2020');
INSERT INTO X
(city,type,cost,reportdate)
VALUES
(null,'Apple',438,'06-04-2020');
CREATE TABLE X_2
(city varchar (10),
type varchar (10),
cost int,
reportdate date);
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
(null,'Peach',632,'31-03-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Peach',268,'01-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Peach',115,'02-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Apple',303,'31-03-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Apple',4,'01-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Apple',734,'02-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Pinapple',null,'31-03-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Pinapple',600,'02-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Paris','Pinapple',160,'03-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Lyon','Peach',337,'31-03-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Lyon','Peach',740,null);
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Lyon','Peach',62,'02-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Lyon','Apple',983,'31-03-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Lyon','Apple',509,'01-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Lyon','Apple',609,'02-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Marseille','Watermelon',869,'01-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Marseille','Watermelon',129,'04-04-2020');
INSERT INTO X_2
(city,type,cost,reportdate)
VALUES
('Marseille','Watermelon',761,'05-04-2020');