I need help with formatting the data from a sql query for creating charts. This is the query below.
SELECT install_status, Date_appended , COUNT(serial_number)
FROM Asset_Base
Where (Date_appended = '2017-09-26' OR Date_appended = '2017-08-31' OR Date_appended = '2017-07-31')
AND (install_status= 'Installed'
OR (install_status= 'In Stock' AND u_install_sub_status = 'Available')
OR install_status= 'Missing')
Group By install_status , Date_appended
Which returns :
install_status Date_appended (No column name)
In Stock 2017-08-31 00:00:00.000 10981
Installed 2017-08-31 00:00:00.000 58764
Missing 2017-08-31 00:00:00.000 51661
In Stock 2017-09-26 00:00:00.000 10830
Installed 2017-09-26 00:00:00.000 59083
Missing 2017-09-26 00:00:00.000 51209
Is there any way I can get the data to look like this instead?
Date_appended In Stock Installed Missing
2017-08-31 10981 58764 51661
2017-09-26 10830 59083 51209
Thanks!