Skip to content

Instantly share code, notes, and snippets.

@x3mxray
x3mxray / rfm.sql
Last active April 11, 2024 21:51
Sitecore CDP Batch Segmentation - Risky of churn customers
SELECT g.meta_ref as guest_ref
FROM (
SELECT o.meta_guest_ref,
NTILE(5) OVER (ORDER BY R DESC) as R_S,
NTILE(5) OVER (ORDER BY F ASC) as F_S,
NTILE(5) OVER (ORDER BY M ASC) as M_S
FROM (
SELECT o.meta_guest_ref,
DATE_DIFF('day', max(date(core_ordered_at)), current_date) AS R,
COUNT(*) AS F,
{
"exportFormatVersion": 2,
"exportTime": "2023-10-30 17:30:10",
"containerVersion": {
"path": "accounts/6203298893/containers/169827438/versions/2",
"accountId": "6203298893",
"containerId": "169827438",
"containerVersionId": "2",
"container": {
"path": "accounts/6203298893/containers/169827438",
Password: WELCOME_TO_GIST
@x3mxray
x3mxray / createcert.json
Last active November 23, 2022 16:04
install_iis_certificate
{
"Parameters": {
"CertificateName": {
"Type": "String",
"Description": "The name of the certificate to be created.",
"DefaultValue": ""
},
"CertPath": {
"Type": "String",
"Description": "The physical path on disk where certificates will be stored.",
@x3mxray
x3mxray / Online_Retail_sitecore_commerce_habitat.csv
Created September 7, 2019 16:36
Historical Sitecore Commerce Habitat orders dataset based on a public Online Retail Dataset (~230k cartlines)
We can't make this file beautiful and searchable because it's too large.
OrderId,ProductId,Description,Quantity,OrderDate,UnitPrice,CustomerID,Country
536477,6001001,Smart WiFi Bundle,16,9/1/2018 12:27,200,16210,United Kingdom
536502,6001001,Smart WiFi Bundle,2,9/1/2018 12:36,200,16552,United Kingdom
536525,6001001,Smart WiFi Bundle,2,9/1/2018 12:54,200,14078,United Kingdom
536528,6001001,Smart WiFi Bundle,1,9/1/2018 13:17,200,15525,United Kingdom
536530,6001001,Smart WiFi Bundle,1,9/1/2018 13:21,200,17905,United Kingdom
536537,6001001,Smart WiFi Bundle,2,9/1/2018 13:51,200,15922,United Kingdom
536539,6001001,Smart WiFi Bundle,2,9/1/2018 14:03,200,15165,United Kingdom
536562,6001001,Smart WiFi Bundle,2,9/1/2018 15:08,200,13468,United Kingdom
536607,6001001,Smart WiFi Bundle,1,9/2/2018 9:29,200,17732,United Kingdom