[thelist] Understanding an SQL Problem

Rob Smith rob.smith at THERMON.com
Tue Jan 7 15:36:01 CST 2003


Rudy

Now that I've collected all this neat data (When Users log in to my
Intranet), I want to display it graphically. I want to visualize the times
people access by hour of the day. Example:

(hours isolated)

6
6
6
7
7
7
7
7
8
8
8
8
8
8
....
15
15
15
16
16

Now, count the 6's, 7's, and on. Find the max number of times in a single
hour our Intranet was accessed. Set that to "100%". Now, in a neat little
table:
<table>
  <tr>
     <!-- in a loop -->
     <td>
        <%=count_per_hour(count)%>
     </td>
     <!-- end a loop -->
  </tr>
  <tr>
    <!-- in a loop -->
     <td>
        <img src="greybox.gif" width="5"
height="<%=percent_of_total(count)%>">
     </td>
    <!-- end a loop -->
  </tr>
</table>

I should see something like this:

     1     1 2 3 6 6 5  1  5  4 3 2 2 1

                 X X
                 X X X     X
                 X X X     X  X
               X X X X     X  X X
             X X X X X     X  X X X X
     X     X X X X X X  X  X  X X X X X
12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
            AM                     PM

Just another attempt at me doing statistics,

Rob.Smith



More information about the thelist mailing list