SQL Addition

The + operator adds two numeric values together — works on literals, columns, or any combination of both.

What & Why

Plain + adds two numbers. It works between two columns, a column and a literal, or two literals — the same operator in every case.

See How It Works

BUSINESS QUESTION

Marketing wants total engagement from opens and clicks for each email send.

idcampaign_idsent_atrecipientsopensclicksunsubscribesbounces
20112024-01-20 15:00:00+001200540180924
20222024-02-15 16:30:00+0080042096512
20332024-03-18 13:00:00+0015006102251431
20442024-04-08 14:00:00+0000000
EXAMPLE QUERY
SELECT
  id AS send_id,
  opens + clicks AS engagement_actions
FROM marketing.email_sends
ORDER BY send_id;
RESULT — exact output from the displayed Queryflo rows
send_idengagement_actions
201720
202516
203835
2040

Each value is the actual opens-plus-clicks sum for one email send.

Intermediate business practice

Sign up free to try it on a real business scenario