MHS
MHS

Reputation: 2350

How to Merge the Headers of multiple columns in HTSQL

I am making a Table in HTSQL, which results like:

Name  Total_Calls  Successful_Calls  Failed_Calls
John       9              5                4

Where as I want to merge the headers like:

           C  A  L  L  S
Name  Total  Successful  Failed
John    9        5          4

Upvotes: 1

Views: 76

Answers (1)

clarkevans
clarkevans

Reputation: 997

You could use :as to rename a column (total_calls to total) and then use brackets to mark your nested record. Here is an example:

http://demo.htsql.org/student%7Bid,%20start_date,%20%7Bname%20:as%20full_name,%20gender%20:as%20sex,%20dob%20:as%20birth_date%7D%20:as%20personal_information%20%7D

Upvotes: 1

Related Questions