clickhouse Join

SELECT
        mb.`datetime` ,
        mb.trading_day ,
        mb.stock_code ,
        mb.open_price ,
        mb.high_price ,
        mb.low_price ,
        mb.close_price, 
        mb.volume  ,
        mb.amount ,
        ga.adjustment, 
        ga.trading_day, 
        ga.stock_code 
FROM
(
 select datetime,trading_day,stock_code,open_price ,high_price ,low_price ,close_price ,volume ,amount from  stock_full.all_stock_1minute_bars where datetime>'2015-01-01 00:00:00' and stock_code ='000002.SZ'  order by `datetime` 
) as mb ALL LEFT JOIN
(
     select trading_day,adjustment,stock_code from  stock_full.gm_adjustment2  where stock_code ='000002.SZ'
) as ga ON mb.trading_day=ga.trading_day

 

上一篇:[Trading] 关于短线交易 Day Trading 的知识


下一篇:检测kbar数据缺失