Created
September 12, 2017 14:59
-
-
Save aczietlow/6912fe87fe65a7e495df416d3ffcb8a9 to your computer and use it in GitHub Desktop.
Naturally sort numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT commerce_product.product_id AS product_id, commerce_product.sku AS commerce_product_sku, commerce_product.changed AS commerce_product_changed, users_commerce_product.mail AS users_commerce_product_mail, users_commerce_product.uid AS users_commerce_product_uid, 'commerce_product' AS field_data_title_field_commerce_product_entity_type, 'commerce_product' AS field_data_field_special_commerce_product_entity_type | |
FROM | |
commerce_product commerce_product | |
ORDER BY LENGTH(commerce_product.sku), commerce_product.sku ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment