



SELECT stock.id AS "stock_id", stock.name AS "stock_name", stock.symbol AS "stock_symbol" 
FROM /dsq_stock2/a_stock stock 
WHERE share_market_data.time('2024-09-16 00:00:00','2025-09-16 00:00:00').find(name = 'dividend_yield').avg().assert($1 > 6) 
LIMIT 0, 500000 
WITH TIMEOUT = 60m
/**
output()
**/
;


SELECT stock.id AS "stock_id", stock.name AS "stock_name", stock.symbol AS "stock_symbol" 
FROM /dsq_stock2/a_stock stock 
WHERE share_market_data.time('2025-05-15 00:00:00','2025-06-01 00:00:00').find(name = 'total_mv').avg().assert($1 > 1e+07) 
LIMIT 0, 500000 
WITH TIMEOUT = 60m
/**
loop(1000)
output()
**/
;

SELECT stock.id AS "stock_id", stock.name AS "stock_name", stock.symbol AS "stock_symbol", stock.share_market_data AS "market_data" 
INTO /temp_stock_net_assets_b3d326e0-1314-46bd-a369-89bb7733f7b5-0 
FROM /dsq_stock2/a_stock stock 
WHERE share_market_data.time('2025-06-30 00:00:00','2025-06-30 23:59:59').find(name = 'net_assets_today').avg().assert($1 > 100000000) 
LIMIT 0, 500000 
WITH TIMEOUT = 60m
;

select * from /temp_stock_net_assets_b3d326e0-1314-46bd-a369-89bb7733f7b5-0
WITH TIMEOUT = 60m
/**
output()
**/
;
