Why you don't use GROUP BY?

----- Original Message -----
From: Siim Einfeldt aka Itpunk <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 04, 2001 1:59 PM
Subject: problems getting DISTINCT data


>
>
> SELECT DISTINCT estitle,id,lepingid FROM main WHERE litsents='something'
> ORDER BY lepingid
>
> Now, lets suppose I have 20 entries with the exact same information (or at
> least estitle and lepingid are the same). What if I wanted to get only one
> entry with the same information? I could do it with LIMIT 1, but this case
> it would only give me one entry. But I have there entries with different
> estitles as well. So how could I manage to get entries only with different
> estitles?
>
> Thanks,
> Siim Einfeldt
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to