# LIQ order by is affected weirdly by case

**URL:** https://community.silverbullet.md/t/liq-order-by-is-affected-weirdly-by-case/2494
**Category:** Troubleshooting
**Created:** [June 15, 2025, 8:29am UTC](https://community.silverbullet.md/t/liq-order-by-is-affected-weirdly-by-case/2494 "2025-06-15T08:29:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JamesD](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@JamesD](https://community.silverbullet.md/u/JamesD)
#### Post date: [June 15, 2025, 8:29am UTC](https://community.silverbullet.md/t/liq-order-by-is-affected-weirdly-by-case/2494/1 "2025-06-15T08:29:09Z")

</div>

Hi all,  
I’ve got a query that returns a list of pages. Some of the pages have names that are in title case, others are lower case. The order of pages has the capital letter pages first A-Z, THEN the lower case pages A-Z.  
How do I make the order ignore the case of the page name?

---

<div class="post-metadata">

### Author: ![Marco10x15](https://community.silverbullet.md/user_avatar/community.silverbullet.md/marco10x15/32/432_2.png) [@Marco10x15](https://community.silverbullet.md/u/Marco10x15)
#### Post date: [June 16, 2025, 7:36am UTC](https://community.silverbullet.md/t/liq-order-by-is-affected-weirdly-by-case/2494/2 "2025-06-16T07:36:24Z")

</div>

I think that string.lower(s) can be a solution:

Example:

```auto
${query[[from index.tag "page"
  where string.startsWith(name, "Inbox")
  select {
    name = name,
    order = string.lower(name)
  }
  order by string.lower(name)
  limit 50
  ]]}

```

---

<div class="post-metadata">

### Author: ![JamesD](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@JamesD](https://community.silverbullet.md/u/JamesD)
#### Post date: [June 16, 2025, 9:19am UTC](https://community.silverbullet.md/t/liq-order-by-is-affected-weirdly-by-case/2494/3 "2025-06-16T09:19:03Z")

</div>

Yeah that makes sense, ta!
