# SUB

Difference between two values

## Signature

> SUB(col1, col2)

## Usage Examples

These examples are based on the [Batch Quick Start](https://docs.pinot.apache.org/release-1.0.0/basics/getting-started/quick-start#batch).

```sql
select homeRuns, baseOnBalls, SUB(homeRuns, baseOnBalls) AS total
from baseballStats 
WHERE teamID = 'ML1' 
AND yearID = 1956 
AND playerName = 'Henry Louis'
```

| homeRuns | baseOnBalls | total |
| -------- | ----------- | ----- |
| 26       | 37          | -11   |
