Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to subtract two columns of a table and create a extra column which holds the values?

Priya Ramakrishnan
Contributor
June 19, 2020

Hi....I am new to Creating charts and tables with confluence.

I am using Table transformer macro. In a page I created the macro by typing {table transformer} inside the macro I pasted my table which looks like this

Capture.PNG

And then I am going to Edit mode of Table Transformer and Clicking on Custom transformation in Presets and in SQL i see SELECT * FROM T*

What I wanted to do is, create a Column in addition to the existing table as 'Remaining' which is 'Total' - 'Finished'.

How should i write an SQL Query to do this?

Kindly help me with this.

1 answer

1 accepted

2 votes
Answer accepted
Andrey Khaneev _StiltSoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2020

Hi Priya,

The query is

SELECT *, 'Total' - 'Finished' AS 'Remaining' FROM T*
Priya Ramakrishnan
Contributor
June 20, 2020

Thanks So much!!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events