how to add group by in sql query code example Example: select query group by name SELECT `gender` FROM `members` GROUP BY `gender`;