Longest reads: sort by a number, skip the blanks

A top-ten of the longest books. Books whose page count has not been entered yet should not appear at all.

The list

In the app this list is called Longest reads.

The list in the editor, with the preview it produces.

What it says

Take every Book. Keep the ones where Pages is not empty. Sort by Pages, highest first. Keep the first 10.

On the storefront

Entries with no value always sort last whichever direction you choose, so the condition is not strictly needed for a top ten; it matters when the limit is larger than the number of filled-in entries, and it documents the intent.

The longest-reads shelf on the every-book page.

In your store

Best-sellers by units sold, top-rated by score, heaviest, dearest. is empty is the reverse and makes a handy maintenance list: books with no page count for the content team.