其他分享
首页 > 其他分享> > clickhouse Join

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

 

标签:code,Join,mb,price,trading,day,clickhouse,stock
来源: https://blog.csdn.net/kangseung/article/details/116353656