Devo fare questa query: contami quanti campi x = 0 e quanti campi y = 1, con un limit 0,3
if (x==tot) {
...
}

Come procedo?