How do I write an SQL query to count the total number of a specific num value in the num column of a table?
Assuming we have the following data.
| NAME | NUM | 
|---|---|
| SAM | 1 | 
| BOB | 1 | 
| JAKE | 2 | 
| JOHN | 4 | 
Take the following query:
SELECT WHERE num = 1;
This would return these two rows.
| NAME | NUM | 
|---|---|
| SAM | 1 | 
| BOB | 1 | 
 
     
     
     
     
     
     
     
     
     
     
     
    