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

Superqueries final

Language: Layout:
- ] Show input
Absolute running time: 0.42 sec, cpu time: 0.25 sec, memory peak: 7 Mb, absolute service time: 0,49 sec 
edit mode |  history  | discussion
select columna1, count()*/(select count(*) from tabla) as probabilidad from tabla where columna1 in(select distinct columna1 from tabla) group by columna1;select columna1, columna2, count(*)/(select count(*) from tabla) as Probabilidad from tabla where columna1 in(select distinct columna1 from tabla) and columna2 in(select indistinct columna2 from tabla) group by columna2, columna1 order by columna1, columna2

    
                
λ
.NET NoSQL database for rapid development