/*
 Navicat Premium Data Transfer

 Source Server         : localhost_3306
 Source Server Type    : MySQL
 Source Server Version : 80020
 Source Host           : localhost:3306
 Source Schema         : marketing

 Target Server Type    : MySQL
 Target Server Version : 80020
 File Encoding         : 65001

 Date: 20/04/2025 00:05:44
*/

create database if not exists marketing;
use marketing;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for main_categories
-- ----------------------------
DROP TABLE IF EXISTS `main_categories`;
CREATE TABLE `main_categories`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `value` decimal(10, 3) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of main_categories
-- ----------------------------
INSERT INTO `main_categories` VALUES (1, '办公用品', 949270.224);
INSERT INTO `main_categories` VALUES (2, '技术', 937985.552);
INSERT INTO `main_categories` VALUES (3, '家具', 1028418.503);

-- ----------------------------
-- Table structure for sales_manager
-- ----------------------------
DROP TABLE IF EXISTS `sales_manager`;
CREATE TABLE `sales_manager`  (
  `sales_manager` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `sales` decimal(10, 3) NULL DEFAULT NULL,
  `profit` decimal(10, 3) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sales_manager
-- ----------------------------
INSERT INTO `sales_manager` VALUES ('郝杰', 502667.277, 55300.637);
INSERT INTO `sales_manager` VALUES ('江奕健', 179421.480, 11725.000);
INSERT INTO `sales_manager` VALUES ('姜伟', 222300.092, 19919.872);
INSERT INTO `sales_manager` VALUES ('王倩倩', 691845.854, 92687.014);
INSERT INTO `sales_manager` VALUES ('杨洪光', 761143.054, 96180.574);
INSERT INTO `sales_manager` VALUES ('张怡莲', 558296.522, 93976.162);

-- ----------------------------
-- Table structure for sales_month
-- ----------------------------
DROP TABLE IF EXISTS `sales_month`;
CREATE TABLE `sales_month`  (
  `month` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `sales` decimal(10, 3) NULL DEFAULT NULL,
  `profit` decimal(10, 3) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sales_month
-- ----------------------------
INSERT INTO `sales_month` VALUES ('1月', 226678.830, 37233.770);
INSERT INTO `sales_month` VALUES ('2月', 109855.158, 19834.458);
INSERT INTO `sales_month` VALUES ('3月', 167173.727, 18748.247);
INSERT INTO `sales_month` VALUES ('4月', 96984.692, 16501.352);
INSERT INTO `sales_month` VALUES ('5月', 232199.107, 23984.947);
INSERT INTO `sales_month` VALUES ('6月', 339729.698, 39157.118);
INSERT INTO `sales_month` VALUES ('7月', 140050.918, 11800.698);
INSERT INTO `sales_month` VALUES ('8月', 356128.507, 66818.087);
INSERT INTO `sales_month` VALUES ('9月', 322759.367, 24133.207);
INSERT INTO `sales_month` VALUES ('10月', 289269.169, 33635.329);
INSERT INTO `sales_month` VALUES ('11月', 342142.150, 42611.870);
INSERT INTO `sales_month` VALUES ('12月', 292702.956, 35330.176);

-- ----------------------------
-- Table structure for sales_province
-- ----------------------------
DROP TABLE IF EXISTS `sales_province`;
CREATE TABLE `sales_province`  (
  `province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `sales` decimal(10, 3) NULL DEFAULT NULL,
  `profit` decimal(10, 3) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sales_province
-- ----------------------------
INSERT INTO `sales_province` VALUES ('安徽', 113742.734, 32222.834);
INSERT INTO `sales_province` VALUES ('北京', 76154.540, 19854.240);
INSERT INTO `sales_province` VALUES ('福建', 102315.080, 32774.700);
INSERT INTO `sales_province` VALUES ('甘肃', 47267.444, -13210.036);
INSERT INTO `sales_province` VALUES ('广东', 254769.725, 58887.605);
INSERT INTO `sales_province` VALUES ('广西', 48349.532, 14036.932);
INSERT INTO `sales_province` VALUES ('贵州', 15893.136, 287.616);
INSERT INTO `sales_province` VALUES ('海南', 10995.880, 4132.940);
INSERT INTO `sales_province` VALUES ('河北', 227145.800, 43675.380);
INSERT INTO `sales_province` VALUES ('河南', 79220.540, 17722.600);
INSERT INTO `sales_province` VALUES ('黑龙江', 273877.632, 66982.132);
INSERT INTO `sales_province` VALUES ('湖北', 135006.900, -33492.340);
INSERT INTO `sales_province` VALUES ('湖南', 163503.277, 31399.277);
INSERT INTO `sales_province` VALUES ('吉林', 76539.617, 17712.317);
INSERT INTO `sales_province` VALUES ('江苏', 128183.776, -16801.764);
INSERT INTO `sales_province` VALUES ('江西', 29987.860, 7944.720);
INSERT INTO `sales_province` VALUES ('辽宁', 152250.028, -29393.812);
INSERT INTO `sales_province` VALUES ('内蒙古', 59787.252, -15047.368);
INSERT INTO `sales_province` VALUES ('宁夏', 12685.988, -900.592);
INSERT INTO `sales_province` VALUES ('山东', 192400.460, 49812.560);
INSERT INTO `sales_province` VALUES ('山西', 99782.900, 25386.900);
INSERT INTO `sales_province` VALUES ('陕西', 102767.168, 21152.628);
INSERT INTO `sales_province` VALUES ('上海', 99893.584, 17668.784);
INSERT INTO `sales_province` VALUES ('四川', 60567.584, -9514.876);
INSERT INTO `sales_province` VALUES ('天津', 95426.030, 20107.010);
INSERT INTO `sales_province` VALUES ('西藏', 1144.920, 400.260);
INSERT INTO `sales_province` VALUES ('新疆', 16700.880, 4683.000);
INSERT INTO `sales_province` VALUES ('云南', 79432.052, 16937.032);
INSERT INTO `sales_province` VALUES ('浙江', 94619.560, -27441.260);
INSERT INTO `sales_province` VALUES ('重庆', 65262.400, 11809.840);

-- ----------------------------
-- Table structure for sales_region
-- ----------------------------
DROP TABLE IF EXISTS `sales_region`;
CREATE TABLE `sales_region`  (
  `region` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `sales` decimal(10, 3) NULL DEFAULT NULL,
  `profit` decimal(10, 3) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sales_region
-- ----------------------------
INSERT INTO `sales_region` VALUES ('东北', 502667.277, 55300.637);
INSERT INTO `sales_region` VALUES ('华北', 558296.522, 93976.162);
INSERT INTO `sales_region` VALUES ('华东', 761143.054, 96180.574);
INSERT INTO `sales_region` VALUES ('西北', 179421.480, 11725.000);
INSERT INTO `sales_region` VALUES ('西南', 222300.092, 19919.872);
INSERT INTO `sales_region` VALUES ('中南', 691845.854, 92687.014);

-- ----------------------------
-- Table structure for sub_categories
-- ----------------------------
DROP TABLE IF EXISTS `sub_categories`;
CREATE TABLE `sub_categories`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `main_category_id` int NULL DEFAULT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `value` decimal(10, 3) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `main_category_id`(`main_category_id`) USING BTREE,
  CONSTRAINT `sub_categories_ibfk_1` FOREIGN KEY (`main_category_id`) REFERENCES `main_categories` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sub_categories
-- ----------------------------
INSERT INTO `sub_categories` VALUES (1, 1, '标签', 18936.540);
INSERT INTO `sub_categories` VALUES (2, 1, '美术', 33038.096);
INSERT INTO `sub_categories` VALUES (3, 1, '器具', 449744.764);
INSERT INTO `sub_categories` VALUES (4, 1, '收纳具', 214582.200);
INSERT INTO `sub_categories` VALUES (5, 1, '系固件', 20045.480);
INSERT INTO `sub_categories` VALUES (6, 1, '信封', 51941.960);
INSERT INTO `sub_categories` VALUES (7, 1, '用品', 47070.128);
INSERT INTO `sub_categories` VALUES (8, 1, '纸张', 51413.740);
INSERT INTO `sub_categories` VALUES (9, 1, '装订机', 62497.316);
INSERT INTO `sub_categories` VALUES (10, 2, '电话', 330951.320);
INSERT INTO `sub_categories` VALUES (11, 2, '复印机', 347513.264);
INSERT INTO `sub_categories` VALUES (12, 2, '配件', 150562.664);
INSERT INTO `sub_categories` VALUES (13, 2, '设备', 108958.304);
INSERT INTO `sub_categories` VALUES (14, 3, '书架', 366969.540);
INSERT INTO `sub_categories` VALUES (15, 3, '椅子', 409393.054);
INSERT INTO `sub_categories` VALUES (16, 3, '用具', 83848.996);
INSERT INTO `sub_categories` VALUES (17, 3, '桌子', 168206.913);

SET FOREIGN_KEY_CHECKS = 1;
