Queries for UserLogger start-work-070517
authorcropposc
Wed, 31 Oct 2007 23:50:40 +0100
branchstart-work-070517
changeset 2367f93faac64b3
parent 235 2fda91649d37
child 237 e9e7f507f332
Queries for UserLogger
src/sql/queries.sql
     1.1 --- a/src/sql/queries.sql	Wed Oct 31 23:04:50 2007 +0100
     1.2 +++ b/src/sql/queries.sql	Wed Oct 31 23:50:40 2007 +0100
     1.3 @@ -49,9 +49,9 @@
     1.4  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1.5  [4] what did a user do during a certain example ?
     1.6  
     1.7 -select Dialog, Step, Time, Worksheet, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
     1.8 +select Dialog, Step, Time, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
     1.9  from UserLogger
    1.10 -where Worksheet='2_1'
    1.11 +where Worksheet='1_0'
    1.12  order by Time;
    1.13  
    1.14  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1.15 @@ -65,6 +65,17 @@
    1.16  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1.17  [6] who are the most frequent users of isac ?
    1.18  
    1.19 +select UserName, 
    1.20 +(select count(*) from UserLogger where step='LO_OPEN_WORKSHEET' and username=ul1.username limit 1) as Examples,
    1.21 +(select count(*) from UserLogger where step='LO_STOP_EXAMPLE' and username=ul1.username limit 1) as Success,
    1.22 +(select count(*) from UserLogger where step like 'UI_SOLVE%' and username=ul1.username limit 1) as Calc_Steps,
    1.23 +(select count(*) from UserLogger where step not like 'UI_SOLVE%' and username=ul1.username limit 1) as Other_Steps
    1.24 +from UserLogger ul1
    1.25 +where Step='LO_START_SESSION'
    1.26 +group by UserName
    1.27 +order by Examples, UserName;
    1.28 +
    1.29 +--old version, NOT CORRECT!!!
    1.30  select UserName, Argument as UserUrl,
    1.31  (select count(*) from UserLogger where step='LO_OPEN_WORKSHEET' and session=ul1.session limit 1) as Examples,
    1.32  (select Success from UserLogger where step='LO_STOP_EXAMPLE' and session=ul1.session limit 1) as Success,