Building a detailed invoice
In the store schema, you have the invoice, invoiceline, and track table. However, these don't quite stand on their own. To get a better idea of customer behavior, we're going to "recreate" each of these invoices with a bit more detail. We'll do this using two common table expressions, which you'll build from the ground up.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Data Manipulation in Snowflake
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
-- Create the cleaned_invoices CTE
WITH ___ AS (
SELECT
___,
___
FROM store.___
WHERE billing_country = 'Germany'
)
SELECT * FROM cleaned_invoices;