It is not a problem of ASE 15.7..It is a problem with the command..
The reason behind this is because of using group by condition with respect to dbid ..due to this the where condition is being over-written with the group by clause..
to avoid this try..
select * from sysusages where segmap!=4 group by segmap order by dbid
A small doubt though..
what is it that you want to achieve with that select statement ?
for what purpose are you using it?
PS: use group by only with aggregate functions viz., sum(),count(),min(),max()..
The fact is, SQL is not something I have been handling for a long time and I am still learning.
The long term goal of this is to create a script that will be launched at space threshold to warn me of space issues.
I was having issues with the math so to verify myself I wanted to do the math manually to validate my script so far and this is where I ended up with this behavior with the group by that I did not understand. In fact, I was trying to do with the "group by" what you perfectly did with "order by".