Magento 2, Update a Product Attribute with SQL

update catalog_product_entity_int

set catalog_product_entity_int.value = 1

where (catalog_product_entity_int.attribute_id = 97) and catalog_product_entity_int.entity_id = (

select entity_id from (

SELECT product.entity_id as entity_id FROM bitnami_magento.catalog_product_entity product

inner join catalog_product_entity_decimal price on price.entity_id = product.entity_id and (price.attribute_id in (78))

inner join catalog_product_entity_int status_t on (status_t.entity_id = product.entity_id) and (status_t.attribute_id=97)

where (price.value > 5 and price.value <= 50)

and (status_t.value = 2)

) as c

)