Search Postgresql Archives

Re: Overriding natural order of query results for a subset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Sat, May 29, 2021 at 9:15 AM Laura Smith <n5d9xq3ti233xiyif2vp@xxxxxxxxxxxxx> wrote:
Hi

I've got a bit of a puzzle that I'm not quite sure how to approach.

Let's say I've got a table of bios, so :

create table bios (
first_name text not null,
last_name text not null,
person_title text,
person_short_bio text
)

You don't have a VIP field, so how do you know who's a VIP and who isn't much less who's a VVIP?  Is that information buried in the title and short bio fields? 

You probably need some kind order by case when .... else .... end clause, where the else clause deals with the non-VIPs, probably negating the need for a nulls last clause. 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux