sql - MySQL count identical values -
i have table named prizes following structure
`id` (primary) `id_multiple` `desc` `winner` i want select don't have winner (null) , display them if have same id_multiple showing count of how many left win of id_multiple.
so example, there's values:
id_multiple | winner | desc 1 | null | voucher 1 | jonh | voucher 2 | null | car 2 | null | car and want display:
left win: 1 voucher 2 car (the desc same id_multiple might ambiguous use id_multiple?)
something like:
select id_multiple,count(id_multiple),`desc` `yourtable` `winner` null group `id_multiple`
Comments
Post a Comment