Table:
+-------------+
| izvajalecID |
+-------------+
| 20 |
| 21 |
| 21 |
| 20 |
| 21 |
+-------------+
I would like to count all the unique ID's and print their values.
For example:
Unique ID's: 2 Values: 20, 21
I tried with the following query. Count works fine, but it returns only one(first) value. What am i doing wrong?
SELECT COUNT(distinct izvajalecID), s.izvajalecID FROM (SELECT izvajalecID FROM servis) s;