I don’t actually like sushi. As a matter of fact, it ranks right up there with mushroom quiche on the “food hate” scale. But I find it wicked funny that the case-insensitive SQL command for filtering by a string is ILIKE (the case sensitive version is LIKE). It means you can end up writing a query that looks like this code snippet:
SELECT galleries.name, COUNT(images.id)
FROM galleries JOIN images
ON galleries.id = images.gallery_id
WHERE images.name ILIKE ‘sushi’
GROUP BY galleries.id ORDER BY galleries.id;
I’m easily amused.