Question: My professor taught me this SQL statement:

```
SELECT COUNT(length) FROM product

```

will return `2` with the following dataset:

```
product
|id | length | code |
|-------------------|
| 1 |    11  | X00  |
| 2 |    11  | C02  |
| 3 |    40  | A31  |

```

She justified it by saying that `COUNT` doesn't count duplicates. I disagreed. After trying a lot of DBMS, I've never found one that has this behaviour. Does such an DBMS exist?

Answer: 
This is how it works in MS SQL Server

> 
> COUNT(\*) returns the number of items in a group. This includes NULL
>  values and duplicates.
> 
> 
> COUNT(ALL expression) evaluates expression for each row in a group and
>  returns the number of nonnull values. 
> 
> 
> COUNT(DISTINCT expression) evaluates expression for each row in a
>  group and returns the number of unique, nonnull values.
> 
> 
>
maybe she mean in conjunction with unique, But Count does COUNT DUPLICATES.
There are some teachers who do not know their stuff, no worries just inform your classmates/friends so that when they go on to higher db and real life they wont forget, better yet send an anonymous message to your teacher asking her that they did not understand some of the sql functions and want a demonstration, have your teacher come up with a way for the class to suggest what to insert include duplicates (do not have the data be large) and when she uses the function count, you got her. Some people will pickup on it, Also when she says other databases, have your friend ask her which ones, then double snare her and say you tried all those databases and they don't work like she said and that count picks up duplicates.