Magento 2 || Get attribute set ID - mpaz-redstage/magento-snippets GitHub Wiki
https://magento.stackexchange.com/questions/267441/sql-query-for-custom-attribute
SELECT attribute_id,backend_type,attribute_code FROM eav_attribute where entity_type_id =4 and attribute_code ='upc'
get values from attribute set ID
select * from eav_attribute_option join eav_attribute_option_value on eav_attribute_option_value.option_id = eav_attribute_option.option_id where eav_attribute_option.attribute_id={attribute_id}