how to get product id and sku in magento with SQL
entity_id is product's unique id so if you call
$product->getId(); you actually get entity_id
The reason for that column name is that product is an EAV (Entity Attribute Value) model so product is an entity - standardized EAV entity identification column name but it can bring confusion...
And the query:
SELECT entity_id as product_id, sku FROM catalog_product_entity