Hi again,
I got it already. all you need to do is to use SUM and CASE.
2015-02-09 14:59 GMT+01:00 Lukasz Brodziak <lukasz.brodziak@gmail.com>:
> Hello,
>
> I have a little problem with SQL statement to get values from a table.
> Given a table:
>
> Name Val1 Val2 Val2
> Smith 0 1 0
> Smith 1 0 0
> Smith 0 0 1
> Roberts 1 0 0
> Roberts 0 0 1
>
> I need to get:
> Name Val1 Val2 Val2
> Smith 1 1 1
> Roberts 1 0 1
>
>
> Best regards