CREATE DATABASE IF NOT EXISTS ashareview DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE ashareview;

CREATE TABLE IF NOT EXISTS a_stock_daily (
    id BIGINT AUTO_INCREMENT PRIMARY KEY,
    stock_code VARCHAR(10) NOT NULL COMMENT '股票代码',
    stock_name VARCHAR(50) NOT NULL COMMENT '股票名称',
    trade_date DATE NOT NULL COMMENT '交易日期',
    open_price DECIMAL(10,2) COMMENT '开盘价',
    close_price DECIMAL(10,2) COMMENT '收盘价',
    high_price DECIMAL(10,2) COMMENT '最高价',
    low_price DECIMAL(10,2) COMMENT '最低价',
    volume BIGINT COMMENT '成交量',
    amount DECIMAL(18,2) COMMENT '成交额',
    change_pct DECIMAL(10,4) COMMENT '涨跌幅(%)',
    turnover_rate DECIMAL(10,4) COMMENT '换手率(%)',
    INDEX idx_trade_date (trade_date),
    INDEX idx_stock_code (stock_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='A股日线行情';

INSERT INTO a_stock_daily (stock_code, stock_name, trade_date, open_price, close_price, high_price, low_price, volume, amount, change_pct, turnover_rate) VALUES
('000001', '平安银行', '2026-05-09', 12.50, 12.85, 12.90, 12.40, 85000000, 1085000000.00, 2.8000, 4.3800),
('000002', '万科A',   '2026-05-09', 8.20,  7.95,  8.30,  7.85, 120000000, 960000000.00, -3.0500, 6.2500),
('000063', '中兴通讯', '2026-05-09', 35.60, 36.20, 36.50, 35.30, 45000000, 1620000000.00, 1.6900, 3.1200),
('000333', '美的集团', '2026-05-09', 68.00, 69.50, 69.80, 67.50, 22000000, 1520000000.00, 2.2100, 2.8500),
('000338', '潍柴动力', '2026-05-09', 15.80, 15.45, 15.90, 15.30, 38000000, 585000000.00, -2.2200, 3.6700),
('000425', '徐工机械', '2026-05-09', 7.50,  7.62,  7.68,  7.45, 55000000, 418000000.00, 1.6000, 4.1200),
('000568', '泸州老窖', '2026-05-09', 185.00, 190.50, 191.00, 183.50, 8000000, 1520000000.00, 2.9700, 1.5600),
('000625', '长安汽车', '2026-05-09', 14.20, 13.80, 14.35, 13.70, 65000000, 900000000.00, -2.8200, 5.3800),
('000651', '格力电器', '2026-05-09', 42.30, 43.10, 43.50, 42.00, 18000000, 776000000.00, 1.8900, 2.1000),
('000725', '京东方A',  '2026-05-09', 4.80,  4.95,  4.98,  4.75, 200000000, 988000000.00, 3.1300, 5.9200),
('000858', '五粮液',   '2026-05-09', 156.00, 160.20, 161.00, 155.00, 12000000, 1920000000.00, 2.6900, 1.8300),
('000895', '双汇发展', '2026-05-09', 26.50, 26.20, 26.60, 26.10, 15000000, 393000000.00, -1.1300, 2.4500),
('000938', '紫光股份', '2026-05-09', 28.30, 29.50, 29.80, 28.00, 25000000, 738000000.00, 4.2400, 3.8900),
('002001', '新 和 成',  '2026-05-09', 22.10, 21.80, 22.20, 21.60, 18000000, 392000000.00, -1.3600, 2.7800),
('002007', '华兰生物', '2026-05-09', 18.60, 19.20, 19.40, 18.40, 28000000, 538000000.00, 3.2300, 3.5600),
('002024', '苏宁易购', '2026-05-09', 2.10,  2.05,  2.12,  2.03, 150000000, 308000000.00, -2.3800, 7.2500),
('002027', '分众传媒', '2026-05-09', 6.80,  6.95,  7.00,  6.75, 90000000, 626000000.00, 2.2100, 4.8300),
('002142', '宁波银行', '2026-05-09', 25.80, 26.30, 26.50, 25.60, 20000000, 526000000.00, 1.9400, 2.9200),
('002230', '科大讯飞', '2026-05-09', 52.00, 54.80, 55.20, 51.50, 35000000, 1920000000.00, 5.3800, 4.1200),
('002304', '洋河股份', '2026-05-09', 98.00, 96.50, 98.50, 96.00, 10000000, 970000000.00, -1.5300, 1.6800),
('002352', '顺丰控股', '2026-05-09', 42.50, 41.80, 42.80, 41.50, 15000000, 627000000.00, -1.6500, 2.3500),
('002415', '海康威视', '2026-05-09', 35.20, 36.80, 37.00, 35.00, 50000000, 1840000000.00, 4.5500, 3.7800),
('002475', '立讯精密', '2026-05-09', 38.50, 39.60, 39.80, 38.20, 28000000, 1110000000.00, 2.8600, 3.4500),
('002493', '荣盛石化', '2026-05-09', 9.80,  9.55,  9.85,  9.50, 60000000, 576000000.00, -2.5500, 4.6800),
('002594', '比亚迪',   '2026-05-09', 310.00, 325.00, 328.00, 308.00, 15000000, 4870000000.00, 4.8400, 2.5600),
('002714', '牧原股份', '2026-05-09', 42.00, 40.80, 42.30, 40.50, 25000000, 1020000000.00, -2.8600, 3.1200),
('002841', '视源股份', '2026-05-09', 75.00, 76.80, 77.20, 74.50, 8000000, 614000000.00, 2.4000, 2.1500),
('003816', '中国广核', '2026-05-09', 3.80,  3.75,  3.82,  3.73, 80000000, 301000000.00, -1.3200, 5.6200),
('600000', '浦发银行', '2026-05-09', 8.50,  8.35,  8.55,  8.30, 70000000, 585000000.00, -1.7600, 4.5200),
('600009', '上海机场', '2026-05-09', 38.50, 39.80, 40.00, 38.20, 12000000, 478000000.00, 3.3800, 2.3800),
('600016', '民生银行', '2026-05-09', 4.90,  4.85,  4.92,  4.82, 90000000, 437000000.00, -1.0200, 5.1200),
('600019', '宝钢股份', '2026-05-09', 7.20,  7.35,  7.40,  7.15, 80000000, 588000000.00, 2.0800, 4.3500),
('600028', '中国石化', '2026-05-09', 6.50,  6.62,  6.65,  6.48, 120000000, 795000000.00, 1.8500, 3.9800),
('600030', '中信证券', '2026-05-09', 22.80, 23.50, 23.60, 22.60, 40000000, 940000000.00, 3.0700, 3.2800),
('600036', '招商银行', '2026-05-09', 38.50, 39.20, 39.50, 38.20, 25000000, 980000000.00, 1.8200, 2.5600),
('600048', '保利发展', '2026-05-09', 11.80, 11.50, 11.85, 11.40, 45000000, 518000000.00, -2.5400, 4.8600),
('600050', '中国联通', '2026-05-09', 5.80,  5.92,  5.95,  5.78, 100000000, 592000000.00, 2.0700, 6.3500),
('600104', '上汽集团', '2026-05-09', 15.20, 14.80, 15.30, 14.70, 35000000, 518000000.00, -2.6300, 3.9200),
('600276', '恒瑞医药', '2026-05-09', 48.50, 50.20, 50.50, 48.00, 20000000, 1000000000.00, 3.5100, 2.8600),
('600309', '万华化学', '2026-05-09', 85.00, 83.50, 85.50, 83.00, 12000000, 1002000000.00, -1.7600, 2.3500),
('600519', '贵州茅台', '2026-05-09', 1750.00, 1795.00, 1800.00, 1740.00, 5000000, 8970000000.00, 2.5700, 0.9800),
('600585', '海螺水泥', '2026-05-09', 25.80, 25.20, 25.90, 25.10, 18000000, 454000000.00, -2.3300, 3.1500),
('600588', '用友网络', '2026-05-09', 12.50, 11.80, 12.60, 11.70, 30000000, 354000000.00, -5.6000, 4.2800),
('600690', '海尔智家', '2026-05-09', 28.50, 29.20, 29.40, 28.30, 22000000, 642000000.00, 2.4600, 2.9800),
('600809', '山西汾酒', '2026-05-09', 230.00, 238.00, 240.00, 228.00, 6000000, 1428000000.00, 3.4800, 1.2500),
('600887', '伊利股份', '2026-05-09', 32.00, 32.80, 33.00, 31.80, 25000000, 820000000.00, 2.5000, 3.1800),
('600893', '航发动力', '2026-05-09', 42.50, 43.60, 44.00, 42.20, 10000000, 436000000.00, 2.5900, 2.6500),
('600900', '长江电力', '2026-05-09', 28.50, 28.80, 28.90, 28.40, 20000000, 576000000.00, 1.0500, 1.8500),
('601012', '隆基绿能', '2026-05-09', 18.50, 17.80, 18.60, 17.60, 45000000, 801000000.00, -3.7800, 4.5200),
('601088', '中国神华', '2026-05-09', 38.00, 38.50, 38.60, 37.80, 15000000, 578000000.00, 1.3200, 2.1500),
('601166', '兴业银行', '2026-05-09', 20.50, 21.00, 21.10, 20.30, 30000000, 630000000.00, 2.4400, 3.5600),
('601318', '中国平安', '2026-05-09', 52.00, 53.50, 53.80, 51.80, 35000000, 1870000000.00, 2.8800, 3.0200),
('601398', '工商银行', '2026-05-09', 5.80,  5.90,  5.92,  5.78, 150000000, 885000000.00, 1.7200, 5.3800),
('601628', '中国人寿', '2026-05-09', 35.00, 34.20, 35.20, 34.00, 25000000, 855000000.00, -2.2900, 3.1200),
('601668', '中国建筑', '2026-05-09', 6.20,  6.35,  6.38,  6.18, 80000000, 508000000.00, 2.4200, 5.6800),
('601688', '华泰证券', '2026-05-09', 18.50, 19.20, 19.30, 18.40, 30000000, 576000000.00, 3.7800, 3.2500),
('601728', '中国电信', '2026-05-09', 7.20,  7.35,  7.38,  7.18, 90000000, 662000000.00, 2.0800, 5.9200),
('601766', '中国中车', '2026-05-09', 8.20,  7.98,  8.25,  7.92, 60000000, 479000000.00, -2.6800, 4.8500),
('601857', '中国石油', '2026-05-09', 8.80,  8.95,  8.98,  8.75, 100000000, 895000000.00, 1.7000, 4.1200),
('601888', '中国中免', '2026-05-09', 85.00, 82.50, 85.50, 82.00, 12000000, 990000000.00, -2.9400, 2.5600),
('601899', '紫金矿业', '2026-05-09', 18.50, 19.20, 19.30, 18.30, 50000000, 960000000.00, 3.7800, 3.8500),
('601919', '中远海控', '2026-05-09', 15.00, 14.50, 15.10, 14.40, 40000000, 580000000.00, -3.3300, 4.3500),
('601985', '中国核电', '2026-05-09', 9.80,  10.10, 10.15, 9.75, 50000000, 505000000.00, 3.0600, 4.2800),
('603259', '药明康德', '2026-05-09', 62.00, 64.50, 65.00, 61.50, 15000000, 968000000.00, 4.0300, 3.1200),
('603288', '海天味业', '2026-05-09', 38.50, 37.80, 38.60, 37.50, 12000000, 454000000.00, -1.8200, 2.1500),
('603501', '韦尔股份', '2026-05-09', 105.00, 109.50, 110.00, 104.00, 8000000, 876000000.00, 4.2900, 2.9800),
('603986', '兆易创新', '2026-05-09', 120.00, 118.00, 121.00, 117.50, 6000000, 708000000.00, -1.6700, 2.3500),
('688981', '中芯国际', '2026-05-09', 85.00, 88.50, 89.00, 84.50, 18000000, 1590000000.00, 4.1200, 3.5600);
