why do I get error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
create view viewAss
as select a.kd_ass,m.nama
from mahasiswa m ,asisten a, honor h
where m.NIM = a.nim and a.kd_ass = h.kd_ass
group by a.kd_ass,m.nama,h.honors
having h.honors > (select avg(h.honors) from honor)
Command(s) completed successfully.
but, when I run ..
select * from viewAss
Error :
Msg 512, Level 16, State 1, Line 2 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.