SQL Query
From: Patrick Pleass <pat_at_pleass.com.au>
Date: Mon, 15 Oct 2001 15:45:01 GMT
Message-ID: <1wDy7.4649$bE1.22696_at_news1.rdc1.nsw.optushome.com.au>
Date: Mon, 15 Oct 2001 15:45:01 GMT
Message-ID: <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 - 17:45:01 CEST