Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

SQL Acosta

Language: Layout:
- ] Show input
Absolute running time: 0.33 sec, cpu time: 0.16 sec, memory peak: 7 Mb, absolute service time: 0,44 sec  
fork mode |  history  | discussion
select materia, count(*)/(select count(*) from financiera) as probabilidad from financiera where materia in(select distinct materia from financiera)  group by materia;  

select materia, industria, count(*)/(select count(*) from financiera) as Probabilidad from financiera where materia in(select distinct materia from financiera)  and industria in(select distinct industria from financiera) group by industria, materia order by materia, industria;
true.