I wrote a quick query
select dno from Employee having max(salary)
In my table, the maximum salary in 96000 and is associated with dno 8. But for some reason, that select statement gives dno 6.
http://hastebin.com/wewahiloki.vhdl
I feel like this is really obvious but I can't figure it out.