select product_dev_data_status.valvePosition,
(LENGTH(product_dev_data_status.valvePosition) - LENGTH( REPLACE (product_dev_data_status.valvePosition, 'g', '')))
+ (LENGTH(product_dev_data_status.valvePosition) - LENGTH( REPLACE (product_dev_data_status.valvePosition, 'f', ''))),
locate('g',product_dev_data_status.valvePosition) ,
product_dev_data_status.valvePosition, product_dev_data_status.*
from local_product_dev_data_status where createdon>NOW() -100000