On Thu, Jan 11, 2007 at 18:51:57 +0100,
Jiří Němec <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I need to remove duplicates rows from a subquery but order these
> results by a column what is not selected. There are logically two
> solutions but no works.
>
> SELECT DISTINCT sub.foo FROM (SELECT ...)
Jiří Němec wrote:
Hello,
I need to remove duplicates rows from a subquery but order these
results by a column what is not selected. There are logically two
solutions but no works.
SELECT DISTINCT sub.foo FROM (SELECT ...) AS sub ORDER BY sub.bar
ERROR: for SELECT DISTINCT, ORDER BY expressions
Hello,
I need to remove duplicates rows from a subquery but order these
results by a column what is not selected. There are logically two
solutions but no works.
SELECT DISTINCT sub.foo FROM (SELECT ...) AS sub ORDER BY sub.bar
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in sele