INSERT INTO ji_stock_price_flow(stock_code,stock_name,sub_num,plus_num,diff,rate,changerate)SELECT stock_code, stock_name, count sub_num, ( SELECT count FROM ji_stock_action ac2 WHERE action != '减持' and ac2.stock_code = ji_stock_action.stock_code GROUP BY ac2.stock_code ) plus_num, ( SELECT count FROM ji_stock_action ac2 WHERE action != '减持' and ac2.stock_code = ji_stock_action.stock_code GROUP BY ac2.stock_code )- count diff, CEIL((( SELECT count FROM ji_stock_action ac2 WHERE action != '减持' and ac2.stock_code = ji_stock_action.stock_code GROUP BY ac2.stock_code )-count)/count/10) as rate, (SELECT rate FROM ji_stock_price_change where ji_stock_price_change.stock_code = ji_stock_action.stock_code) changerate FROM ji_stock_action WHERE action = '减持' ORDER BY rate desc