mysql query for finding the products that had less than 10 sales and at least 1 sale within 7 days after their release
here are my tables: products table: CREATE TABLE `products` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) NOT NULL, `description` text NOT NULL, `price` decimal(15,2) NOT NULL, `total_profit` decimal(15,2) NOT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT…