Session Ready
Exercise

Where again

When filtering strings, you need to wrap your value in 'single quotes', as you did in the previous exercise. You don't need to do this for numeric values, but you DO need to use single quotes for date columns.

In this course, dates are always represented in the YYYY-MM-DD format (Year-Month-Day), which is the default in Microsoft SQL Server.

Instructions 1/3
undefined XP
  • 1

    Select the nerc_region and demand_loss_mw columns, limiting the results to those where affected_customers is greater than or equal to 500000 (500,000)

    • 2

      Update your code to select description and affected_customers, returning records where the event_date was the 22nd December, 2013.

    • 3

      Limit the results to those where the affected_customers is BETWEEN 50000 and 150000, and order in descending order of event_date.