# The blog post link: https://[Log in to view URL]
-- create a table
CREATE TABLE cats (
name VARCHAR(255),
breed VARCHAR(255),
weight FLOAT,
color VARCHAR(255),
age INT
);
INSERT INTO cats (name, breed, weight, color, age) VALUES
('Ashes', 'Persian', 4.5, 'Black', 5),
('Molly', 'Persian', 4.2, 'Black', 1),
('Felix', 'Persian', 5.0, 'Tortoiseshell', 2),
('Smudge', 'British Shorthair', 4.9, 'Black', 4),
('Tigger', 'British Shorthair', 3.8, 'Tortoiseshell', 2),
('Alfie', 'Siamese', 5.5, 'Brown', 5),
('Oscar', 'Siamese', 6.1, 'Black', 1),
('Millie', 'Maine Coon', 5.4, 'Tortoiseshell', 5),
('Misty', 'Maine Coon', 5.7, 'Brown', 2),
('Puss', 'Maine Coon', 5.1, 'Tortoiseshell', 2),
('Smokey', 'Maine Coon', 6.1, 'Brown', 4),
('Charlie', 'British Shorthair', 4.8, 'Black', 4);
# Solution 1:
# Write here using CTE
# Solution 2:
# Write here using Window function
To embed this project on your website, copy the following code and paste it into your website's HTML: