in reply to Re^3: 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?

Hai,
Here the row others prints as NULL which as follows.How can i add data type for the others row in the below sql query.
| others | NULL | NULL |
SELECT queue_name, jobs_pend, jobs_run FROM ( SELECT queue_name, jobs_pend, jobs_run FROM queues ORDER BY queue_name LIMIT 5 ) UNION ALL SELECT 'others', SUM(jobs_pend) AS jobs_pend, SUM(jobs_run) AS jobs_ru +n FROM ( SELECT jobs_pend, jobs_run FROM queues ORDER BY queue_name LIMIT 5 OFFSET 5 )

Replies are listed 'Best First'.
Re^5: How to add columns with new row name using perl from mysql query?
by huck (Prior) on Apr 07, 2017 at 07:12 UTC

    At Google no one can hear you grovel. (apologies to Alien)

    Proper indentation makes it much easier to make sure everything is balanced doesnt it?