Back to prompts
Data & AnalysisPremiumadvanced
4.7

The Data Warehouse Builder

Spin up a complete database schema before lunch.

Copy & Paste this prompt
Provide end-to-end SQL scripts to build and load a small data warehouse.

Requirements:
- Create all objects in a "dw" schema
- 5 dimension tables and 2 fact tables
- Include a Date dimension
- Provide INSERT statements with sample data (one INSERT per row)
- Include constraints
- Provide all SQL statements together in one script
#sql#data-warehouse#database#schema-design

Works with

chatgptclaudegemini

🧠 Why This Works

This prompt applies dimensional modeling principles (star schema, slowly changing dimensions) systematically, ensuring the AI produces a warehouse design optimized for analytical queries rather than transactional operations. It enforces naming conventions and indexing strategies from the start.

πŸ“… When to Use This Prompt

Use when building a new data warehouse or restructuring an existing oneβ€”whether migrating from spreadsheets to a proper analytics stack, setting up dbt models, or designing a schema for Snowflake, BigQuery, or Redshift. Essential before writing any ETL pipelines.

🎯 What You'll Get

You get a complete schema with fact and dimension tables, appropriate grain definitions, SQL CREATE statements with proper data types and constraints, recommended indexes, and an ETL loading strategy with incremental update patterns.

πŸ”— Related Prompts

Coding & DevelopmentPremium

Database Schema Designer

Design a normalized, scalable database schema from a project description β€” tables, relationships, indexes, and queries.

databaseschema-designsql
β˜…4.8
advanced
Data & AnalysisPremium

Cohort Analysis Step-by-Step

Guide through building a cohort analysis to understand user retention, behavior, and lifetime value.

cohort-analysisretentionanalytics
β˜…4.7
advanced