SQLite Forum

Case-insensitive using 'ORDER BY'
Login
If you want to change the collation (sort order) for text data, you need to specify the name of the collation you want to use, either in the table definition for the column if the column will always use that collation by default rather than the BINARY collation (which is the default if you do not specify one), or, where you want to change the collation/sort/compare sequence for one operation only, then for that one operation.

eg:

CREATE TABLE x (Name TEXT NOT NULL COLLATE NOCASE);  
CREATE INDEX a ON b (whuppy COLLATE NOCASE);  
SELECT diddly FROM bo ORDER BY diddly COLLATE NOCASE;  
SELECT * FROM yippee WHERE twat == 'for sure' COLLATE NOCASE;  

So you need to specify the collation that you want to use when sorting/comparing in the order by clause, as in:

select name,title from artists join cds on artists.artistid=cds.artistid where cds.genre like 'Amb%' and name like '%' order by name collate nocase,title;

<https://sqlite.org/datatype3.html#collating_sequences> for documentation