[isf-wifidog] Features...

Francois Proulx fproulx at lecameleon.net
Mer 4 Mai 10:43:50 EDT 2005


I talked with Benoit on the phone yesterday he was surprised to see that the query could not be not really be done in short, since 

SELECT DISTINCT ON() with ORDER BY requires the left-most field in the order by to match the ON() expression. In my case, it's the onverse.... I want to get distinct results based on content_group_element_id field ( a hash ), but I want to sort rows by first_display_timestamp.

We finally settled for doing it with a subselect, doing a distinct to get unique rows ON(content_group_element_id) and sort the sub-select on first_display_timestamp. 

Pfffew that was a shitty SQL query, but it works great.

--- Alexandre Carmel-Veilleux <saruman at northernhacking.org> wrote:

From: Alexandre Carmel-Veilleux <saruman at northernhacking.org>
Date: Wed, 4 May 2005 10:01:56 -0400
To: WiFiDog Captive Portal <wifidog at listes.ilesansfil.org>
Subject: Re: [isf-wifidog] Features...



Plus d'informations sur la liste de diffusion WiFiDog