if i have a table with 'Time' and 'Name' for example: '12:30', 'Anders' ; '12:30', 'Olle' ; '12:45', 'Lars' ; '13:00', 'Erik' and i would like to get the following output after a select: 12:30, Anders, 2 (a 2 because there is two ppl having this exact time) 12:30, Olle, 2 12:45, Lars, 1 13:00, Erik, 1 But i'm having trouble using SELECT time, name, count(time) from table group by time; because it only returns one 'time' for each row