first: yes i'm a sql noob and i really need some help:

```
SELECT COUNT(id), SUM(rating), COUNT(rating) FROM comments WHERE phone='$phone';" 

```

this needs to be something like this:

```
SELECT COUNT(id), SUM(rating), (COUNT(rating) WHERE rating>0) FROM comments WHERE phone='$phone';"

```

Can anyone help out?