Hi,
ich möchte zählen wie oft willkürliche Nummern in einer Spalte vorkommen. Die Nummern sind immer eindeutig
Beispiel: Spalte ist transponiert dargstellt
[2, 2, 2, 2, 66 66, 9, 5 ,5 ,5 ,5 ,3 ,100 ,102]^T
Was ich als Ergebnis haben möchte:
4x kam eine Zahl einfach vor
1x kam eine Zahl zweifach vor
0x kam eine Zahl dreifach vor
2x kam eine Zahl vierfach vor
sprich:
1 -> 4
2 -> 1
3 -> 0
4 -> 2
Geht das in SQL?
ich möchte zählen wie oft willkürliche Nummern in einer Spalte vorkommen. Die Nummern sind immer eindeutig
Beispiel: Spalte ist transponiert dargstellt
[2, 2, 2, 2, 66 66, 9, 5 ,5 ,5 ,5 ,3 ,100 ,102]^T
Was ich als Ergebnis haben möchte:
4x kam eine Zahl einfach vor
1x kam eine Zahl zweifach vor
0x kam eine Zahl dreifach vor
2x kam eine Zahl vierfach vor
sprich:
1 -> 4
2 -> 1
3 -> 0
4 -> 2
Geht das in SQL?
Comment