I'm stuck around the query synatax for an additional scenario.

Allows say I've got a table structured like:

id - title - count

Now I must get records whose count values sum to particular number.

Example.

1 - A - 3
2 - A - 2
3 - A - 5
4 - B - 1
5 - C - 2

And I must get only records (tuples) whose count useful together provides me with number 10.

The end result should produce:

1 - A - 3
2 - A - 2
3 - A - 5

select *
from tableName t
where 10 = (
    select sum(count)
    from tableName
    where name = t.name
)

I believe you are able to make this happen having a nested query, like so:

SELECT *
FROM (
    SELECT *, SUM(`count`) AS `sum`
    FROM `table`
    GROUP BY `name`
)
WHERE `sum` = '10'