I have an sql query that counts the number of Codes for each hour of the day. There are 3 codes [50, 61 and 63]. The data I get from my sql 'group by' looks something like this:
Code:
Hr Cd Num
-- -- ---
09 50 1
09 61 5
09 63 6
10 50 25
10 61 24
10 63 17
11 50 24
11 61 12
11 63 22
12 50 27
12 61 33
12 63 7
13 50 53
13 61 58
13 63 23
14 50 51
14 61 42
14 63 24
15 50 37
15 61 12
15 63 14
16 50 88
16 61 50
16 63 4
Hr is the hour, Cd is the code and Num is the count of Cd.
I wish to create a table that will display the Hour on the x-axis and the count on the y-axis. There would be a seperate bar for each code. Therefore in most cases there would be 3 bars [on for each code] for every hour.
How can I acheive this? I tried using the chart function in excel but I cant seem to get it display the data the way I want it.
I have quite alot of data so changing any of is manually is a no no.