knowledge/skills/sql_mastery/SKILL.md
# 🐘 PostgreSQL Mastery: Stored Procedures & Attribution ## 1. The "Gold Standard" Stored Procedure Structure ```sql CREATE OR REPLACE PROCEDURE sp_refresh_attribution_daily() LANGUAGE plpgsql AS $$ BEGIN -- 1. Truncate Staging TRUNCATE TABLE stg_daily_traffic; -- 2. Ingest New Data (Idempotent) INSERT INTO fact_attribution (user_id, source, medium, timestamp) SELECT > **Note**: Full content available to MidOS PRO subscribers. See https://midos.dev/pricing
npx skillsauth add midosresearch/midos knowledge/skills/sql_masteryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CREATE OR REPLACE PROCEDURE sp_refresh_attribution_daily()
LANGUAGE plpgsql
AS $$
BEGIN
-- 1. Truncate Staging
TRUNCATE TABLE stg_daily_traffic;
-- 2. Ingest New Data (Idempotent)
INSERT INTO fact_attribution (user_id, source, medium, timestamp)
SELECT
> **Note**: Full content available to MidOS PRO subscribers. See https://midos.dev/pricing
tools
High-density industrial mold counting and inventory tracking using YOLOv8/v11.
development
--- name: typescript_mastery version: 1.0.0 type: foundational category: web_development tags: - typescript - javascript - type-systems - generics - web-development created: 2026-02-10 phase: phase_1_foundation priority: critical demand_metric: "#1 GitHub language 2026 (2.6M monthly contributors)" acquisition_method: research_synthesis sources: 40+ --- # TypeScript Mastery > **Note**: Full content available to MidOS PRO subscribers. See https://midos.dev/pricing
development
--- name: react_patterns_hooks version: 1.0.0 type: foundational category: web_development tags: - react - react19 - hooks - typescript - server-components - performance created: 2026-02-10 phase: phase_1_foundation priority: critical demand_metric: "20% of front-end developer jobs 2026" acquisition_method: research_synthesis sources: 30+ prerequisites: - typescript_mastery --- > **Note**: Full content available to MidOS PRO subscribers. See https://midos.dev/pricing
development
# 📊 Power BI Sovereignty: The Star Schema Standard ## 1. Data Model - **Fact Table**: `f_attribution_events` (High volume, transactional). - **Dim Tables**: `d_campaigns`, `d_sources`, `d_dates`. - **Relationship**: One-to-Many from Dims to Fact. Single Direction filter (usually). ## 2. DAX Formulas for Attribution ### CPA (Cost Per Acquisition) ```dax CPA = DIVIDE( > **Note**: Full content available to MidOS PRO subscribers. See https://midos.dev/pricing