Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Recap
4. Part 2 – additional exercise
Summary

Instruction

Good job! Let's try another exercise.

Exercise

We've got the same table:

CREATE TABLE smartphone (
  id integer PRIMARY KEY,
  code varchar(32),
  manufacturer varchar(32),
  model varchar(32),
  price_usd decimal(10, 2),
  memory_gb integer,
  screen varchar(32),
  main_camera_mpx integer,
  release_date date
);

The index_manufacturer_model index needs some modifications. We typically need to sort the model values in descending order, with NULL values appearing last.

  1. Delete the index index_manufacturer_model.
  2. Create the index on the manufacturer and model columns again. This time, the model column should be sorted in descending order and any NULL values should appear last.