Re: [RDBO] SELECT DISTINCT on a single column

2006-12-04 Thread Mike Schilli
On Sun, 3 Dec 2006, John Siracusa wrote: > This will do what you want: > > $events = > WatchLAN::Activity::Manager->get_some_table( > distinct => 1, > select => [ 'some_val ' ], > query=> [ event_time => { gt => ... } ]); > > but keep in mind that it'll retu

Re: [RDBO] SELECT DISTINCT on a single column

2006-12-03 Thread John Siracusa
On 12/3/06 5:13 PM, Mike Schilli wrote: > By the way, this might be a stretch, but what I would really want is a > query like > > SELECT MAX(event_time), some_val > FROM some_table > WHERE event_time > "2006-12-03 08:39:00" > GROUP BY some_val; > > that would give me only the *new

Re: [RDBO] SELECT DISTINCT on a single column

2006-12-03 Thread rose
On Sun, 3 Dec 2006, John Siracusa wrote: > This will do what you want: > > $events = > WatchLAN::Activity::Manager->get_some_table( > distinct => 1, > select => [ 'some_val ' ], > query=> [ event_time => { gt => ... } ]); > > but keep in mind that it'll ret

Re: [RDBO] SELECT DISTINCT on a single column

2006-12-03 Thread John Siracusa
On 12/3/06 2:54 PM, John Siracusa wrote: > This will do what you want: > > $events = > WatchLAN::Activity::Manager->get_some_table( > distinct => 1, > select => [ 'some_val ' ], ^ | Whoops, there should n

Re: [RDBO] SELECT DISTINCT on a single column

2006-12-03 Thread John Siracusa
On 12/3/06 2:02 PM, [EMAIL PROTECTED] wrote: > I'd like to perform a query like > > SELECT DISTINCT some_val from some_table > WHERE event_time > ... > > to get all distinct values of some_val after a given time. Using > > my $events = WatchLAN::Activity::Manager->get_some_table( >

[RDBO] SELECT DISTINCT on a single column

2006-12-03 Thread rose
Is there a way to use DISTINCT on a single field in Rose::DB? I have a table like ++-+---+ | id | event_time | some_val | ++-+---+ | 1 | 2006-12-03 09:15:00 | 1 | | 2 | 2006-12-03 09:15:00 |