Aan de slagGa gratis aan de slag

MIN, MAX and AVG

Along with summing and counting, you'll frequently need to find the minimum, maximum, and average of column values. Thankfully, T-SQL has functions you can use to make the task easier!

Deze oefening maakt deel uit van de cursus

Introduction to SQL Server

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

-- Find the minimum number of affected customers
SELECT 
  ___(affected_customers) AS ___ 
FROM 
  grid
-- Only retrieve rows where demand_loss_mw has a value
WHERE
  ___ ___ ___ NULL;
Code bewerken en uitvoeren