Drupal Views alter Filter to CAST() string as Float

Detection score: 4.0

<p>SELECT users_field_data.created AS users_field_data_created, user__field_compliance_percentage.field_compliance_percentage_value AS user__field_compliance_percentage_field_compliance_percentag, users_field_data.uid AS uid
{users_field_data} users_field_data
LEFT JOIN {user__roles} user__roles_value_0 ON users_field_data.uid = user__roles_value_0.entity_id AND user__roles_value_0.roles_target_id = 'supplier'
LEFT JOIN {user__field_supplier_type} user__field_supplier_type ON users_field_data.uid = user__field_supplier_type.entity_id AND user__field_supplier_type.field_supplier_type_value = '0'
LEFT JOIN {user__field_compliance_percentage} user__field_compliance_percentage ON users_field_data.uid = user__field_compliance_percentage.entity_id AND user__field_compliance_percentage.deleted = '0'
WHERE ((user__field_supplier_type.field_supplier_type_value IS NULL)) AND ((users_field_data.status = '1') AND (user__roles_value_0.roles_target_id = 'supplier'))
ORDER BY users_field_data_created DESC, user__field_compliance_percentage_field_compliance_percentag ASC

<p>This is query of my view but i did one mistake i want to sort compliance percentage but it is in string type so i need to use query alter can anybody guide me.</p>
Posted 8 days ago | reported 8 days ago
Posted by vikash (1)

Caught by 4 reasons: