There is a table with a source id column. You need to calculate the number of duplicate columns and display their number with the source_id example.

source_id 123 111 123 112 111 123 вывод source_id 123 count 3 source_id 111 count 2 source_id 112 count 1 

how can I bring this to mysql? I will be grateful for any help

  • 2
    select source_id, count(1) from table group by source_id - Mike
  • @Mike Set as answer I mark as answer - Alexander Shvedov
  • one
    I think we need to find a double issue, of course there are a couple of thousand. just to find them without knowing the answer is very difficult :) And as luck would have it, I have links to receive a sum, not a quantity, like this. stackoverflow.com/q/599265/194569 - Mike
  • @Mike FirePlay :) - Alexander Muksimov

0