Explain different type of SQL query?
Asked in the Technical round stage. Round 1 - Technical. Using the provided customer, account, and transaction tables, write a query that demonstrates a practical reporting query. Include January 2024 transactions only, classify each qualifying customer by net flow, and exclude customers with no positive January credits.
Output
- One row per qualifying customer with
customer_id, customer_name, account_count, total_credits, total_debits, net_flow, and financial_position
- Sort by
net_flow descending, then customer_id ascending
- Include customers with positive January credits, including customers whose net flow is negative