Schema SQL Query SQL Results Edit on DB Fiddle
CREATE TABLE Users (
    id INT PRIMARY KEY,
    name VARCHAR(50)
);

CREATE TABLE WebsiteVisits (
    user_id INT,
    website VARCHAR(100),
    timestamp DATETIME
);

INSERT INTO Users (id, name) VALUES
(1, 'John'),
(2, 'Sally'),
(3, 'Bob');

INSERT INTO WebsiteVisits (user_id, website, timestamp) VALUES
(1, 'google.com', '2023-06-01 10:00:00'),
(1, 'google.com', '2023-06-02 12:00:00'),
(1, 'yahoo.com', '2023-06-03 14:00:00'),
(2, 'google.com', '2023-06-04 16:00:00'),
(2, 'yahoo.com', '2023-06-05 18:00:00'),
(2, 'yahoo.com', '2023-06-06 20:00:00'),
(3, 'bing.com', '2023-06-07 22:00:00');