A financial institution needs to summarize transaction data by month to generate monthly reports. How would you implement this aggregation in a database?
- AVG() function
- GROUP BY with MONTH() function
- JOIN with a calendar table
- SUM() function
To summarize transaction data by month, you would use GROUP BY along with the MONTH() function to extract the month from the date column. This allows you to group transactions by month and generate the required monthly reports.
Loading...
Related Quiz
- Which database design approach is often used in conjunction with denormalization to improve query performance?
- Scenario: A retail company wants to analyze sales data, including sales volume, revenue, and product categories. Which schema would you recommend for their data warehouse: Star Schema or Snowflake Schema, and why?
- In a Star Schema, the fact table is surrounded by _______ tables.
- _______ is a technique that exploits repeating patterns in data to reduce storage size.
- In relational schema design, a _______ key uniquely identifies a record within a table.