Clicktrails Queries
--Querying Clicktrails--
--NOTE: sales.stage_clicktrails/sales.prod_clicktrails are both Materialized Views of clicktrails_partition
-- and sales.clicktrails_partition is where the actual Clicktrails exist
-- Clicktrails partition gets populated first and then an MV refresh populates stage clicktrails (also prod clicktrails once a property is in the prod table).
-- a property's ClickTrails will only appear in prod_clicktrails table if the property has been pushed to PROD for that particular month.
SELECT *
FROM sales.stage_clicktrails
--WHERE sale_property_id IN (49088)
WHERE source ilike '%trupayment%'
and sales_month = '2020-07-01'
ORDER BY source;
SELECT * FROM sales.stage_clicktrails WHERE source ilike '%purecarssocial%';
-- we query Stage clicktrails because Prod clicktrails table will not show anything until the property has been pushed to PROD
SELECT *
FROM sales.stage_clicktrails
--WHERE sale_property_id IN (49088)
WHERE source ilike '%trupayment%'
and sales_month = '2020-07-01'
ORDER BY source;
Clicktrails Refresh
See: ClickTrails Refresh