RE: Sorting and then...

Поиск
Список
Период
Сортировка
От Michael Ansley
Тема RE: Sorting and then...
Дата
Msg-id 7F124BC48D56D411812500D0B747251480F51A@fileserver002.intecsystems.co.uk
обсуждение исходный текст
Ответ на Sorting and then...  (Wei Weng <wweng@kencast.com>)
Список pgsql-sql
<p><font size="2">But if you want the largest 10, then you can:</font><p><font size="2">SELECT name FROM <table>
ORDERBY id DESC LIMIT 10;</font><p><font size="2">assuming that you mean largest numerically.</font><p><font
size="2">Cheers...</font><br/><p><font size="2">MikeA</font><br /><br /><p><font size="2">>> -----Original
Message-----</font><br/><font size="2">>> From: Roberto Mello [<a
href="mailto:rmello@cc.usu.edu">mailto:rmello@cc.usu.edu</a>]</font><br/><font size="2">>> Sent: 10 April 2001
03:41</font><br/><font size="2">>> To: wweng@pobox.com</font><br /><font size="2">>> Cc:
pgsql-sql@postgresql.org</font><br/><font size="2">>> Subject: Re: [SQL] Sorting and then...</font><br /><font
size="2">>></font><br /><font size="2">>> </font><br /><font size="2">>> On Mon, Apr 09, 2001 at
07:22:52PM-0400, Wei Weng wrote:</font><br /><font size="2">>>  </font><br /><font size="2">>> > And I
wantto get the names of the largest 10 "id"s. How </font><br /><font size="2">>> can I do that in </font><br
/><fontsize="2">>> > sql?</font><br /><font size="2">>> </font><br /><font size="2">>>      What
doyou mean by "largest"? Largest id? "largest" </font><br /><font size="2">>> text string? If</font><br /><font
size="2">>>it's the id you can do:</font><br /><font size="2">>> </font><br /><font size="2">>>     
selectmax(id) from <table>;</font><br /><font size="2">>> </font><br /><font size="2">>>     
-Roberto</font><br/><font size="2">>> -- </font><br /><font size="2">>> +----| <a
href="http://fslc.usu.edu"target="_blank">http://fslc.usu.edu</a> USU Free Software & GNU/Linux </font><br /><font
size="2">>>Club |------+</font><br /><font size="2">>>   Roberto Mello - Computer Science, USU - <a
href="http://www.brasileiro.net"target="_blank">http://www.brasileiro.net</a> </font><br /><font
size="2">>>       <a href="http://www.sdl.usu.edu" target="_blank">http://www.sdl.usu.edu</a> - Space Dynamics
Lab,Developer    </font><br /><font size="2">>> Backup is for whimps!</font><br /><font size="2">>>
</font><br/><font size="2">>> ---------------------------(end of </font><br /><font size="2">>>
broadcast)---------------------------</font><br/><font size="2">>> TIP 3: if posting/reading through Usenet,
pleasesend an appropriate</font><br /><font size="2">>> subscribe-nomail command to majordomo@postgresql.org so
thatyour</font><br /><font size="2">>> message can get through to the mailing list cleanly</font><br /><font
size="2">>></font><code><font size="3"><br /><br />
_________________________________________________________________________<br/> This e-mail and any attachments are
confidentialand may also be privileged and/or copyright <br /> material of Intec Telecom Systems PLC (or its affiliated
companies).If you are not an <br /> intended or authorised recipient of this e-mail or have received it in error,
pleasedelete <br /> it immediately and notify the sender by e-mail. In such a case, reading, reproducing, <br />
printingor further dissemination of this e-mail is strictly prohibited and may be unlawful. <br /> Intec Telecom
SystemsPLC. does not represent or warrant that an attachment hereto is free <br /> from computer viruses or other
defects.The opinions expressed in this e-mail and any <br /> attachments may be those of the author and are not
necessarilythose of Intec Telecom <br /> Systems PLC. <br /><br /> This footnote also confirms that this email message
hasbeen swept by<br /> MIMEsweeper for the presence of computer viruses. <br />
__________________________________________________________________________<br/></font></code> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Inheritance Semantics
Следующее
От: Amanda Riera
Дата:
Сообщение: Copying null values