Noos
PT EN
RAN-DBDEA-00228
Ranvier · DBDEA

Prova DBDEA Tópicos: transformation Dificuldade: medium A questão está em en.

A monthly revenue report must show one row per month with two separate columns, web_revenue and store_revenue. The source is a large orders table with the columns event_month, channel, and amount, and the report must compute both totals in a single pass over the table. Which construct computes the two metrics in one aggregation?

Alternativas (Modo Leitura) Clique para filtrar a discussão →
  1. A. One query per channel, each filtering WHERE channel = 'web' or WHERE channel = 'store', whose result sets are combined into the report afterwards
  2. B. GROUP BY channel with SUM(amount), which yields one row per channel carrying that channel's revenue total
  3. C. PIVOT on channel, which is limited to count aggregations and therefore cannot produce revenue sums per channel
  4. D. SUM(amount) FILTER (WHERE channel = 'web') and SUM(amount) FILTER (WHERE channel = 'store') within one GROUP BY event_month
Revelar gabarito

Resposta correta: SUM(amount) FILTER (WHERE channel = 'web') and SUM(amount) FILTER (WHERE channel = 'store') within one GROUP BY event_month

Referência: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-functions

02 — Camada de Mielina · Discussão Canônica

Onde a prova tenta te enganar — e como quem passou resolveu.

0 Aprovados

contribuíram nesta questão

Matriz de Dissecção de Alternativas Clique numa alternativa para filtrar ou inaugurar a dissecção.
✦ Síntese Consolidada (Wiki) rev. #1 (baseline) · CC BY-SA 4.0
Inaugurar síntese desta questão →

Ainda não há síntese comunitária consolidada para esta questão. Abaixo está o ponto de partida oficial verificável — se você passou na prova, inaugure a dissecção das alternativas.

Gabarito Oficial (D): SUM(amount) FILTER (WHERE channel = 'web') and SUM(amount) FILTER (WHERE channel = 'store') within one GROUP BY event_month

Ranvier · DBDEA

Contribuir com a Questão

Sua contribuição constrói sua Bainha Orbital

Contribuições dos pares

Nenhuma contribuição pública ainda. Seja o primeiro aprovado a explicar por que as alternativas incorretas enganam — sua contribuição constrói sua Bainha Orbital.