EasySQL
Search Books by Title Keyword
SQLDatabases
Write a SQL query that returns the title and author of all books
whose title contains the word "Data" (case-insensitive), ordered by title.
Table: books
| id | title | author | year |
|---|---|---|---|
| 1 | Data Science Handbook | Smith | 2020 |
| 2 | Machine Learning Intro | Jones | 2019 |
| 3 | Database Design Basics | Brown | 2021 |
| 4 | Data Engineering Guide | Davis | 2022 |
| 5 | Clean Code | Martin | 2008 |
| 6 | Big Data Analytics | Wilson | 2023 |
Expected output (columns: title, author)
Big Data Analytics|Wilson
Data Engineering Guide|Davis
Data Science Handbook|Smith
Database Design Basics|Brown
LIKE '%Data%'matches any title containing "Data" anywhere.SQLite's LIKE is case-insensitive for ASCII letters.
Sample tests
Test #14 of 6 books match %Data%
Input: "CREATE TABLE books (id INTEGER, title TEXT, author TEXT, year INTEGER);\nINSERT INTO books VALUES\n (1, 'Data Science Handbook', 'Smith', 2020),\n (2, 'Machine Learning Intro', 'Jones', 2019),\n (3, 'Database Design Basics', 'Brown', 2021),\n (4, 'Data Engineering Guide', 'Davis', 2022),\n (5, 'Clean Code', 'Martin', 2008),\n (6, 'Big Data Analytics', 'Wilson', 2023);"
Output: "Big Data Analytics|Wilson\nData Engineering Guide|Davis\nData Science Handbook|Smith\nDatabase Design Basics|Brown"