Re: SQL Query

From: Paul Quenneville <paulq_at_home.com>
Date: Mon, 15 Oct 2001 17:02:50 GMT
Message-ID: <_EEy7.59632$5h5.25899523_at_news3.rdc2.on.home.com>


why not concatenate the two together,

SELECT count(distinct day||start_time) FROM activities;

"Patrick Pleass" <pat_at_pleass.com.au> wrote in message news:1wDy7.4649$bE1.22696_at_news1.rdc1.nsw.optushome.com.au...
> Hi All,
>
> Single table (called activities) with fields day, start_time and duration.
 I
> want to find the number of distinct day and start_time combinations,
> ignoring the duration.
>
> In MySQL I would execute this:
>
> SELECT count(distinct day,start_time) FROM activities;
>
> Oracle only seems to allow a single field in a count statement. When I use
> count(*), the number returned includes all distinct durations as well.
>
> Can someone suggest a work-around?
>
> Thanks,
>
> Pat
>
>
Received on Mon Oct 15 2001 - 19:02:50 CEST

Original text of this message