<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
<p>This form accepts a Postgresql SELECT statement and displays the results. Examples:
<ul>
<li>This statement will return the total bytes transferred by each user for the pre-purge weblog history<pre>SELECT clientuserid, sum(bytes) AS total FROM pubweblog GROUP BY clientuserid ORDER BY total DESC</pre>
<li>This statement limits the above statement to a specific range of dates (just yesterday)<pre>SELECT clientuserid, sum(bytes) AS total FROM pubweblog WHERE logdatetime >= 'yesterday' and logdatetime < 'today' GROUP BY clientuserid ORDER BY total DESC</pre>
<li>This statement limits the above statement to a specific range of dates (just yesterday)<pre>SELECT clientuserid, sum(bytes) AS total FROM pubweblog WHERE logdatetime >= 'yesterday' and logdatetime < 'today' GROUP BY clientuserid ORDER BY total DESC</pre>
<li>This statement will return the number of requests and blocks by hour over the course of the entire usage history<pre>SELECT extract(hour from date) AS hour, sum(numrequest) AS numrequest, sum(numblock) AS numblock FROM usagestat GROUP BY extract(hour from date) ORDER BY hour</pre>
</ul>
The available database tables and descriptions are listed below.</p>
<% local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Available Database Tables"}), page_info, htmlviewfunctions.incrementheader(header_level)) %>
<% local header_level3 = htmlviewfunctions.displaysectionstart(cfe({label="pubweblog and pubweblog_history"}), page_info, htmlviewfunctions.incrementheader(header_level2)) %>
<p>These tables contain the pre-purge and historical access logs respectively. The definition of the table is as follows:</p>
<pre>
(
...
...
@@ -110,8 +104,9 @@ The available database tables and descriptions are listed below.</p>
<p>This table contains the database history, including such information as which log files were loaded and how many entries they contained. The definition of the table is as follows:</p>
<pre>
(
...
...
@@ -119,8 +114,9 @@ The available database tables and descriptions are listed below.</p>