1. Learn
  2. /
  3. Projects
  4. /
  5. Applying SQL to Real-World Problems

Connected

Exercise

Make this query easier to read - Part I

In this exercise you will work on making the query below easier to read.

SELECT title, rating FROM film 
WHERE rating = 'G' OR rating = 'PG' OR rating = 'R';

Instructions 1/2

undefined XP
    1
    2

Question

Which of these strategies should you employ to improve the readability of this query?

  • (1) Capitalize SQL commands.
  • (2) Use new lines & indentation.
  • (3) Use snake_case.
  • (4) Use IN instead of many OR statements.
  • (5) Use BETWEEN when possible.

Possible answers