Skip to content
SQLSimplified
BackendQuestion 19 of 52

Functional (Expression) Indexes

Problem

Users log in with lower-cased emails: WHERE LOWER(email) = '[email protected]'. A normal index on email is ignored. Write a query that outputs ddl with the value: "CREATE INDEX idx_lower_email ON users (LOWER(email)); creates a functional index that indexes the output of the expression."

Database Schema

This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.

Try It

Loading playground environment...

Hint

Solution