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. __