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
select sku.id as "skuId", sku, coalesce(merchant_detail_url, affiliate_detail_url, null) as "detail_url", coalesce(affiliate_buy_url, affiliate_detail_url) as "buy_url", price, EXTRACT(EPOCH FROM sku.created AT TIME ZONE 'UTC') as "skuCreated", EXTRACT(EPOCH FROM sku.updated AT TIME ZONE 'UTC') as "skuUpdated", sku.active as "skuActive", | |
product.id as "productId", product.name as "productName", image, product.description, category.name as "category", product.age, product.gender, EXTRACT(EPOCH FROM product.created AT TIME ZONE 'UTC') as "productCreated", EXTRACT(EPOCH FROM product.updated AT TIME ZONE 'UTC') as "productUpdated", product.active as "productActive", | |
merchant.id as "merchantId", merchant.name as "merchantName", EXTRACT(EPOCH FROM merchant.created AT TIME ZONE 'UTC') as "merchantCreated", EXTRACT(EPOCH FROM merchant.updated AT TIME ZONE 'UTC') as "merchantUpdated", | |
category.id as "categoryId" | |
from sku | |
join product on sku.product_id = product.id | |
join merchant on sku.merc |