
CREATE TABLE `www_openai_niche_search` (
  `openai_niche_search_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `openai_request_id` int(11) DEFAULT NULL,
  `search_input` varchar(50) NOT NULL,
  `expire_date` int(11) unsigned NOT NULL,
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`openai_niche_search_id`),
  KEY `idx_openai_request_id` (`openai_request_id`),
  KEY `idx_search_input` (`search_input`)
) ENGINE=InnoDB COMMENT='stores website niche search input data';

CREATE TRIGGER `www_openai_niche_search_insert_timestamp` BEFORE INSERT ON `www_openai_niche_search`
FOR EACH ROW SET NEW.insert_timestamp = NOW();

INSERT INTO `www_openai_niche_search` (`openai_niche_search_id`, `openai_request_id`, `search_input`, `expire_date`) VALUES
(1, 1, 'popular now', 1727589474);


CREATE TABLE `www_openai_niche_search_result` (
  `openai_niche_search_result_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `openai_niche_search_id` int(11) DEFAULT NULL,
  `search_result` varchar(100) NOT NULL,
  `profit_scale` tinyint unsigned NOT NULL,
  `search_desc` TEXT NOT NULL,
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`openai_niche_search_result_id`),
  KEY `idx_openai_niche_search_id` (`openai_niche_search_id`)
) ENGINE=InnoDB COMMENT='stores website niche search result data';

CREATE TRIGGER `www_openai_niche_search_result_insert_timestamp` BEFORE INSERT ON `www_openai_niche_search_result`
FOR EACH ROW SET NEW.insert_timestamp = NOW();

INSERT INTO `www_openai_niche_search_result` (`openai_niche_search_id`, `search_result`, `search_desc`, `profit_scale`) VALUES
(1, 'Eco-Friendly Products And Practices', 'Eco-friendly products and practices are becoming increasingly popular as people become more aware of the impact of their actions on the environment. From reusable shopping bags to solar-powered gadgets, there are countless opportunities to create a business that promotes sustainability and reduces waste.', 95),
(1, 'Remote Work And Digital Nomads', 'Remote work and digital nomadism are on the rise, with more people seeking flexible work arrangements that allow them to travel and work from anywhere in the world. Businesses that cater to this growing trend, such as co-working spaces, online collaboration tools, and remote job boards, have the potential to be highly profitable.', 90),
(1, 'Machine Learning, Robotics', 'Machine learning and robotics are rapidly advancing fields with applications in a wide range of industries, from healthcare to manufacturing. Businesses that leverage these technologies to develop innovative products and services, such as AI-powered chatbots, autonomous vehicles, and predictive analytics tools, have the potential to disrupt traditional markets and generate significant profits.', 92),
(1, 'Virtual Assistants', 'Virtual assistants are in high demand as more businesses and individuals seek help with administrative tasks, customer service, and other day-to-day responsibilities. Companies that provide virtual assistant services, such as scheduling appointments, managing emails, and conducting research, can capitalize on this growing market and generate substantial revenue.', 88),
(1, 'Aritificial Intelligence And Automation', 'Artificial intelligence and automation are transforming the way we live and work, with applications in everything from self-driving cars to predictive analytics. Businesses that develop AI-powered products and services, such as chatbots, recommendation engines, and automated data analysis tools, have the potential to revolutionize industries and generate significant profits.', 84),
(1, 'Digital Marketing', 'Digital marketing is a rapidly growing field with opportunities for businesses to reach new customers and grow their online presence. Companies that specialize in digital marketing services, such as social media management, search engine optimization, and content creation, can help clients achieve their marketing goals and generate substantial revenue.', 95);
