How to merge only 1 specific column in 2 rows by using sql?

Goh May 15, 2023

11.jpg
I have 2 pivot tables (data retrive from JIRA queries) and one normal table which I have to insert the data manually in the 'Cost' Column.
These 3 tables are going to display as one table in the page.

Does anyone know how to merge the rows like this after published the page?
222.jpg
Appreciate your help :)

2 answers

4 votes
Katerina Rudkovskaya [Stiltsoft]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 16, 2023

Hi @Goh,

In general, you may try the following SQL query to group your data:

Tue 4-1.png

SELECT FORMATWIKI(SUM('Member' + "\n")) AS 'Member',
'Cost'
FROM T*
GROUP BY 'Cost'

Tue 4-2.png

But I really can’t see how it will get along with your case. As I understand, you join all the three tables into one table, so all “members” should be in separate cells for the comparison.

The variant that you’ve shown on the screenshot is not possible at all: if you create a table with merged cells manually and then wrap it in the Table Transformer macro, the cells will be split at once. The macro treats tables as mini databases, so there can’t be any merged cells.

Goh June 27, 2023

Thanks for the respond @Katerina Rudkovskaya [Stiltsoft]

Yes, the 'members' are appear in 3 tables, and join to become one

It's actually few columns where the first 4 columns data are imported from JIRA (joined with 1st and 2nd column) and the last column will be in manually or some formula to put into the sql because there is no such data can be imported from JIRA (it's calculation).

Do you still have other method to merge the cells because only certain cells need to be merged?

z.png

Katerina Rudkovskaya [Stiltsoft]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 28, 2023

Hi @Goh,

Unfortunately, as we need to group your table by cost (no matter via the Table Transformer or Pivot Table macro), not only the last column will be merged but other columns as well. You'll get a standard Excel-like pivot table as a result.

Wed 7-1.png

Like Stiltsoft support likes this
0 votes
Nilesh Changan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2024

How to merge only 1 specific column in 2 rows by using sql?

Stiltsoft support
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.
October 21, 2024

Hi @Nilesh Changan ,

You may learn about the Table Transformer usage in our documentation.

Or maybe the Pivot Table macro with a more simple UI will help your case.

If you are stuck, you may refer to our support portal that is confidential: share the screenshot of your source table and describe what you need to get as a result. We'll try to help. 

Suggest an answer

Log in or Sign up to answer