

-- SELECT stock.share_market_data.time('2025-03-17 00:00:00','2025-09-15 00:00:00') AS "total_volume"
-- FROM /dsq_stock2/a_stock stock 
-- WHERE stock.name like '%茅台%'  
-- LIMIT 0, 500000 
-- WITH TIMEOUT = 6m
-- /**
-- output()
-- **/
-- ;



-- SELECT stock.share_market_data.time('2025-03-17 00:00:00','2025-09-15 00:00:00').find(name = 'trade_volume').unit('sum', '1d') AS "total_volume"
-- FROM /dsq_stock2/a_stock stock 
-- WHERE stock.name like '%茅台%'  
-- LIMIT 0, 500000 
-- WITH TIMEOUT = 6m
-- /**
-- output()
-- **/
-- ;


SELECT stock.share_market_data AS "market_data" 
INTO /temp_stock_volume_6e5a7aa8-4869-4155-b69d-28f30ffdf64e-0 
FROM /dsq_stock2/a_stock stock 
WHERE stock.name like '%茅台%'  
LIMIT 0, 500000 
WITH TIMEOUT = 6m;


SELECT temp.market_data.time('2025-03-17 00:00:00','2025-09-15 00:00:00').find(name = 'trade_volume').unit('sum', '1d') AS "total_volume" 
FROM /temp_stock_volume_6e5a7aa8-4869-4155-b69d-28f30ffdf64e-0 temp LIMIT 0, 500000
/**
output()
**/
;
