Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: High-Value Transaction Count | CASE WHEN for Aggregates and Reporting
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: High-Value Transaction Count

Task

Swipe to start coding

Write a query that, for each customer, counts the number of transactions where the amount is greater than or equal to 1000.

  • Use the transactions table.
  • For each customer_id, count the number of transactions with amount greater than or equal to 1000.
  • The result must show one row per customer_id with the count of such transactions as high_value_transaction_count.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 3
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

bookChallenge: High-Value Transaction Count

Swipe to show menu

Task

Swipe to start coding

Write a query that, for each customer, counts the number of transactions where the amount is greater than or equal to 1000.

  • Use the transactions table.
  • For each customer_id, count the number of transactions with amount greater than or equal to 1000.
  • The result must show one row per customer_id with the count of such transactions as high_value_transaction_count.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 3
single

single

some-alt