Filtered Aggregates

Easy
2
65.0% Acceptance

Calculate the average total invoice amount and specifically calculate the average total of invoices from the year 2020.

  • Columns to Retrieve:
    • AverageTotal
    • AverageTotal2020
  • Details:
    • You need to form a query targeting the Invoice table.
    • You are required to calculate the average total invoice amount across all records.
    • Additionally, an average of the total invoice amounts specifically for the year 2020 should also be calculated.
  • Ordering Requirement:
    • The results should be ordered by AverageTotal.