IniziaInizia gratis

Calculating the total

In this chapter, you will use the shipments data. The Shipments table has several columns such as:

  • MixDesc: the concrete type
  • Quantity: the amount of concrete shipped

In this exercise, your objective is to calculate the total quantity for each type of concrete used.

Questo esercizio fa parte del corso

Intermediate SQL Server

Visualizza il corso

Istruzioni dell'esercizio

Write a T-SQL query which will return the sum of the Quantity column as Total for each type of MixDesc.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

-- Write a query that returns an aggregation 
___ MixDesc, ___
FROM Shipments
-- Group by the relevant column
___
Modifica ed esegui il codice