Discuss MySQL SQL Help: Unique and Group By Question in the MySQL Help forum on Dev Shed. MySQL SQL Help: Unique and Group By Question MySQL Help forum discussing administration, SQL syntax, and other MySQL-related topics. MySQL is an open-source relational database management system (RDBMS).
Time spent in forums: 36 m 56 sec
Reputation Power: 0
MySQL SQL Help: Unique and Group By Question
I have a table with, as an example, the following contents:
column: type food
ROW1 : fruit orange
ROW2 : veg tomato
ROW3 : fruit apple
ROW4 : fruit banana
ROW5 : veg spinach
ROW6 : veg spinach
ROW7 : fruit tomato
I am trying to come up with a query to return the unique types with the unique counts per.
I'm a novice SQL programmer so struggling where to start... any advice or direction would be appreciated.