Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Detect Spending Spikes | Advanced Window Function Applications
Window Functions in SQL

bookChallenge: Detect Spending Spikes

Compito

Swipe to start coding

Write a query to flag transactions where the amount is at least double the customer's average transaction amount over the previous 12 months.

  • For each record in the performance table, treat the score as the transaction amount.
  • Calculate the average transaction amount for each employee over the previous 12 months, not including the current transaction.
  • Flag the transaction if its amount is at least double this average.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 3. Capitolo 7
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

bookChallenge: Detect Spending Spikes

Scorri per mostrare il menu

Compito

Swipe to start coding

Write a query to flag transactions where the amount is at least double the customer's average transaction amount over the previous 12 months.

  • For each record in the performance table, treat the score as the transaction amount.
  • Calculate the average transaction amount for each employee over the previous 12 months, not including the current transaction.
  • Flag the transaction if its amount is at least double this average.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 3. Capitolo 7
single

single

some-alt