(ORACLE SQL) about subquery and operators like ALL,ANY etc -


i have 3 tables

create table airships(      idas number primary key,      nameas varchar2(20),      range number  );  create table certificate(      idem number not null,      idas number not null,      foreign key (idem) references employees(idem),      foreign key (idas) references airships(idas)  );  create table employees(      idem number primary key,      nameem varchar2(20), paycheck number  ); 

i have find idem employees certified biggest number of airships using subquery , oparatos exists,in,all,any

i've managed find 1 employee, whithout usig of oparatos.

select  * (select idem,count(idas) airshipname       certificate       group idem       order count(idas) desc) rownum=1 

i'm not sure how using specific operators list. here's how having

the all operator explained here. can use query:

select "idem" certificate group "idem" having count(*) >= (     select count(*)     certificate     group "idem") 

demo


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -