Re: [GENERAL] Problem with getting the right order
От | dustin sallings |
---|---|
Тема | Re: [GENERAL] Problem with getting the right order |
Дата | |
Msg-id | Pine.NEB.4.02.9810212119090.393-100000@dhcp-199.west.spy.net обсуждение исходный текст |
Ответ на | Problem with getting the right order (Henrik Pedersen <HenrikP@mail.ikasths.dk>) |
Список | pgsql-general |
On Wed, 21 Oct 1998, Henrik Pedersen wrote: // When i do a : // // ./psql -c "select count(vnr),enr from votes where cnr=1 group by enr" // vote // This is almost what i want, execpt that i want the result to be // ordered by count, instead og enr. so that the entry, which got most // votes is listed first You should slap an ``order by count'' at the end. I think it'd be ``order by count(vnr)'' or you could alias it and order it by the alias. // For example: // // 11| 1 // 10| 8 // 4| 4 // 1| 2 // 1| 3 // 1| 5 // 1| 6 // // // // hope someone outthere can help me :) // // Henrik Pedersen // Demark // // -- SA, beyond.com The world is watching America, pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net> | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L________________________________________ and America is watching TV. __
В списке pgsql-general по дате отправления: