You can add an aditional column which holds the information TopUser or not.
CREATE TABLE test
(
UserName char(30),
TopMemberPos integer default 1
)
We define by ourself, that '0' means TopMember.
Test data:
INSERT INTO test (UserName, TopMemberPos) Values
('U1', '1'),
('U2', '0'),
('U3', '1'),
('U4', '0'),
('U5', '1'),
('U6', '0'),
('U7', '1'),
('U8', '0'),
('U9', '0');
Test query:
SELECT UserName from test order by TopMemberPos, UserName;
Testresult:
UserName
--------
U2
U4
U6
U8
U9
U1
U3
U5
U7
I hope it helps.
[Edit] More intuitive logic/Name/conventions
CREATE TABLE test
(
UserName char(30),
TopMember integer default 0
)
We define by ourself, that '1' means TopMember.
Test data:
INSERT INTO test (UserName, TopMember) Values
('U1', '0'),
('U2', '1'),
('U3', '0'),
('U4', '1'),
('U5', '0'),
('U6', '1'),
('U7', '0'),
('U8', '1'),
('U9', '1');
Test query:
SELECT UserName from test order by TopMember DESC, UserName;
Testresult:Same as above