I have 2 columns in my product table -name and brand, Given is the data,

```
NAME               BRAND
'Ruby Axe Guitar', 'Guitar''s & Co'
'TV'             , 'LG' 

```

When I tried this query its working fine,

```
select name,brand, sum(1000) as sum,'Test' as name1
from products
group by name,brand

```

but I got surprised even when I dont include brand in the `group by` clause the query is working fine..

```
select name,brand, sum(1000) as sum,'Test' as name1
from products
group by name

```

Can someone explain?