Apache Pinot Docs
Search…
latest
SUB
This section contains reference documentation for the SUB function.
Difference between two values

Signature

SUB(col1, col2)

Usage Examples

These examples are based on the Batch Quick Start.
1
select homeRuns, baseOnBalls, SUB(homeRuns, baseOnBalls) AS total
2
from baseballStats
3
WHERE teamID = 'ML1'
4
AND yearID = 1956
5
AND playerName = 'Henry Louis'
Copied!
homeRuns
baseOnBalls
total
26
37
-11
Last modified 1mo ago
Copy link