Technical stuff Requirements are like water. They're easier to build on when they're frozen.

Posts Tagged ‘mySQL’

mySQL: find out distinct values of a column and the number of their occurrences

06.20.2009 · Posted in Quick and dirty, Software, testing

So, we need to find out different values of a column and the number of their occurrences. Let’s set up a small test first: -- Step #1: prepare the ground CREATE DATABASE IF NOT EXISTS `test`; DROP TABLE IF EXISTS `test`.`test_count_distinct`; CREATE TABLE `test`.`test_count_distinct` ( `id` INT(11) NOT NULL auto_increment PRIMARY KEY, `title` VARCHAR(50) NOT ...