This would be my table called numeros
with its columns called N1 N2 N3 N4
and their respective numeros
in each column.
What I can not do is to tell me how many times each numero
came out in each column.
EXAMPLE TABLE:
NUMEROS
---------------
N1 -- N2
1 -- 22
5 -- 1
1 -- 12
Given the case of the table I put above as an example, the query should show this result.
N1
---------
Numero - Veces que salio
1 -- 2
5 -- 1
N2
---------
Numero - Veces que salio
22 -- 1
1 -- 1
12 -- 1
The query I'm using is this one, but it does not give me the results as I want:
SELECT uno,dos, COUNT(uno) as CantRep1,
COUNT(dos) as CantRep2
FROM jugada
GROUP BY uno,dos
uno
and dos
would be in the example n1
and n2
.