Skip to content

Instantly share code, notes, and snippets.

CREATE OR REPLACE PROCEDURE ANALYTICS.dbt_markwan_sprocs.CalculateMonthlySalesByNation()
RETURNS VARCHAR
LANGUAGE SQL
AS
$$
BEGIN
-- Create the temporary table for months
CREATE OR REPLACE TEMPORARY TABLE temp_months AS (
WITH RECURSIVE cte_months AS (
@dltm-markwan
dltm-markwan / README.md
Last active September 30, 2025 15:13
dev containers for dbt

Setup dbt dev containers in 10 minutes

Pre-requites

  1. Docker - https://docs.docker.com/desktop/install/mac-install/
  2. VSCode
  3. VSCode extension: Dev Containers

Instructions

This gist will contain two options - dbt Core or dbt Cloud CLI The following steps are required by both:

@dltm-markwan
dltm-markwan / dbt_snowflake_solutions_ex1.sql
Last active September 30, 2025 15:13
Snowflake Bootcamp Gists
{{
config(
materialized='table'
)
}}
with
source as (
@dltm-markwan
dltm-markwan / ex1_dim_customers.sql
Last active February 1, 2024 10:03
MDS 2023 - Code Starters
{{
config(
materialized='view'
)
}}
with final as (
select
store_id || "-" || cast(id as string) as unique_id,
pk,