Re: ORDER records based on parameters in IN clause - Mailing list pgsql-sql

From Zac
Subject Re: ORDER records based on parameters in IN clause
Date
Msg-id d9u38g$1ao3$2@news.hub.org
Whole thread Raw
In response to Re: ORDER records based on parameters in IN clause  (Zac <zaccheob@inwind.it>)
List pgsql-sql
> SELECT
>     table.*
> FROM
>     table
>     JOIN (SELECT id, count(id) AS count FROM... your subquery) AS x
> ORDER BY
>     x.count
> 
> Bye.
Sorry: I forgot join condition:
SELECT    table.*
FROM    table    JOIN (SELECT id, count(id) AS count FROM... your subquery) AS x ON 
(table.id = x.id)
ORDER BY    x.count


pgsql-sql by date:

Previous
From: Zac
Date:
Subject: Re: ORDER records based on parameters in IN clause
Next
From: KÖPFERL Robert
Date:
Subject: Re: ENUM like data type