in reply to Re^11: How to add columns with new row name using perl from mysql query?
in thread How to add columns with new row name using perl from mysql query?
The above thing now works for me.But the problem is others row not have the data type.So it prints NULL.How can i add data type along with 'others' row.select queue_name,jobs_pending,jobs_running from((select queue_name,jo +bs_pending,jobs_running from queues order by queue_name limit 5)union + all(select 'others',sum(jobs_pending) int as jobs_pending,sum(jobs_r +unning) as jobs_running from (select jobs_pending,jobs_running from q +ueues order by queue_name limit 0 offset 5 ) foo)) foo;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^13: How to add columns with new row name using perl from mysql query?
by poj (Abbot) on Apr 07, 2017 at 06:46 UTC |