Skip to main content
SQL • LESSON 181

Transformation Layer

How can we apply business rules and tax calculations to completed orders?

Advanced3 Minutes1940 XP
🤔 THE QUESTION

How can we apply business rules and tax calculations to completed orders?

💡 WHAT IS IT?

Mathematical operations (amount * 1.18) and status filtering transform raw data into enriched business tables.

🎯 WHAT IS IT USED FOR?

Silver transformation layer, computed metric generation, tax and fee attribution.

💻 EXAMPLE
SELECT
order_id,
customer_id,
amount,
amount * 1.18 AS amount_with_tax
FROM source_orders
WHERE status = 'Completed';

🎯 Mission Objectives

Practice typing production-grade SQL code for Transformation Layer.

  • Silver transformation layer
  • Derived business metrics
  • Tax calculation
  • Status filtering