Re: Forms: Select Distinct

From: Mike Dwyer <dwyermj_at_co.larimer.co.us>
Date: 2000/03/02
Message-ID: <MNuv4.34$7o2.11899_at_wdc-read-01.qwest.net>#1/1


You don't say what you want to do with columns d and e. You can do "select distinct a, b, c from yourtable" with no problem. You could add a count(*) or sum(d), etc. by dropping the "distinct" and using "group by." E.g., "select a, b, c, count(*), sum(d) from yourtable group by a, b, c". (Obviously, I am assuming column d is numeric.)

Rainer Kagerer <rainer.kagererNOraSPAM_at_quelle.at.invalid> wrote in message news:066c66cb.995387bf_at_usw-ex0106-045.remarq.com...
> Hi!
>
> I have got a table with 5 columns in and want to select 3 of
> them with a select distinct.
> a number
> b number
> c date-time yyyy-mm-dd-hh24-mi-ss
>
> And I want to get all columns with a,b and c yyyy-mm but not
> duplicate.
> What do I have to do? Is there any property to be set?
>
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
 *
> The fastest and easiest way to search and participate in Usenet - Free!
>
Received on Thu Mar 02 2000 - 00:00:00 CET

Original text of this message