Created
January 15, 2021 19:36
-
-
Save cgartner-redstage/977cc5f0cafdb5c017905be448fb478d to your computer and use it in GitHub Desktop.
Magento 2 DB Queries
This file contains 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
# Get product SKU by url key | |
select e.entity_id,e.sku,v.value from catalog_product_entity e | |
inner join catalog_product_entity_varchar v on e.entity_id = v.entity_id and | |
attribute_id = (select attribute_id from eav_attribute where attribute_code = 'url_key' and entity_type_id = 4) | |
where v.value = '<url_key>'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment