Aan de slagGa gratis aan de slag

Creating CTEs (II)

In this exercise, you will use a CTE to return all the information regarding the patient(s) with the maximum BloodPressure.

Deze oefening maakt deel uit van de cursus

Intermediate SQL Server

Cursus bekijken

Oefeninstructies

  • Create a CTE BloodPressure that returns one column (MaxBloodPressure) which contains the maximum BloodPressure in the table.
  • Join this CTE (using an alias b) to the main table (Kidney) to return information about patients with the maximum BloodPressure.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

-- Create the CTE
WITH ___ 
AS (___)

SELECT *
FROM Kidney a
-- Join the CTE  
___
___
Code bewerken en uitvoeren