Postgresql – How to write SQL query with multiple conditions using CASE function
The table The task is: Count the number of customers who simultaneously: have more than 5 payments that exeed 5000 dollars and have an average payment value of more than 10,000 dollars I have done it using window function and…