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

programa 2

Language: Layout:
- ] Show input
Absolute running time: 0.26 sec, cpu time: 0.15 sec, memory peak: 7 Mb, absolute service time: 0,33 sec 
edit mode |  history  | discussion
select campo1, count(*)/(select count(*) from tabla) as probabilidad from tabla where campo1 in (select distinct campo1 from tabla) group by campo1;

select campo1, campo2, count(*)/(select count(*) from tabla) as Probabilidad from tabla where campo1 in (select distinct campo1 from tabla) and campo2 in (select distinct campo2 from tabla)group by campo2, campo1 order by campo1, campo2;

    
                
λ
.NET NoSQL database for rapid development