ORDER BY COLUMN_A, (COLUMN_B or COLUMN_C), COLUMN_D

From: Rodrigo Rosenfeld Rosas <rr(dot)rosas(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: ORDER BY COLUMN_A, (COLUMN_B or COLUMN_C), COLUMN_D
Date: 2012-09-12 21:44:15
Message-ID: CAGmv+wKCpc9VeyYp6nS9WL1vrtX=3+i87mFVMP4sEpB1LyPGQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

This is my first message in this list :)

I need to be able to sort a query by column A, then B or C (which one
is smaller, both are of the same type and table but on different left
joins) and then by D.

How can I do that?

Thanks in advance,
Rodrigo.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Samuel Gendler 2012-09-12 21:53:48 Re: ORDER BY COLUMN_A, (COLUMN_B or COLUMN_C), COLUMN_D
Previous Message Gary Stainburn 2012-09-12 08:17:00 Re: weird join producing too many rows