I have a table images - foo_id isn't a key, can have more than one row with the same number.
How do I count the rows with different values for foo_id?
images:
id (int) | foo_id (int) | ... Example:
0 | 1 | ... 0 | 2 | ... 0 | 3 | ... 0 | 1 | ... Wanted result:
3