Skip to content

Instantly share code, notes, and snippets.

sumanththikka / sans_contemporary.sql
Created August 31, 2016 22:50
SKUs without Contemporary style
View sans_contemporary.sql
CREATE TABLE discover_bi_development.sku_style_from_collections_dup_1 AS
WITH sku_collection_positions AS (
collection_variants.collection_id, AS variant_id,
((collection_variants.position / 3)+1) as row,
((collection_variants.position % 3)+1) as column
FROM spree.collection_variants
View target_sku_2
:title=>"Square Arm Bonded Leather Sofa - Threshold™",
"Add style and comfort to your living room with the Threshold Square Arm Sofa. Its modern lines and track arm silhouette gives this sofa the clean look you’ve been looking for. Enrobed in bonded leather, the loose backs and cushions make cleaning a piece of cake! Its spring core, foam-filled seat cushion will provide you with ultimate comfort while its solid wood feet will ensure extra stability. Combine this Threshold Sofa with other pieces from the Threshold Square Arm Collection for a complete, coordinated look.",
:price=>{:originalPrice=>599.99, :originalPriceText=>"$599.99", :currentPrice=>599.99, :currentPriceText=>"$599.99", :currencyCode=>"USD", :priceQualifier=>" "},
:categoryName=>"sofas & sectionals"},
View sample_thd_response.rb
{:ratingsReviews=>{:averageRating=>5, :totalReviews=>1},