1.1 --- a/src/sql/queries.txt Thu Oct 04 18:36:40 2007 +0200
1.2 +++ b/src/sql/queries.txt Fri Oct 05 20:50:09 2007 +0200
1.3 @@ -16,5 +16,56 @@
1.4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.5 > select * from UserLogger;
1.6
1.7 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.8 +[1]
1.9 +# In Spalte Duration müsste statt step='UI_CLOSE_WORKSHEET' eigentlich step='LO_STOP_SESSION' stehen,
1.10 +# dieses wird aber noch nicht in die Datenbank geschrieben.
1.11 +select UserName, Argument as UserUrl, Time as Begin,
1.12 +unix_timestamp((select Time from UserLogger where step='UI_CLOSE_WORKSHEET' and session=ul1.session)) - unix_timestamp(ul1.time) as Duration,
1.13 +(select count(*) from UserLogger where step='LO_OPEN_WORKSHEET' and session=ul1.session) as Examples
1.14 +from UserLogger ul1
1.15 +where step='LO_START_SESSION';
1.16
1.17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.18 +[2]
1.19 +select session, Argument as ID, FormulaTo as Example, Time as Begin,
1.20 +unix_timestamp((select Time from UserLogger where step='LO_STOP_EXAMPLE' and session=ul1.session limit 1)) - unix_timestamp(ul1.time) as Duration,
1.21 +(select Success from UserLogger where step='LO_STOP_EXAMPLE' and session=ul1.session limit 1) as Success,
1.22 +(select count(*) from UserLogger where step like 'UI_SOLVE%' and session=ul1.session limit 1) as Calc_Steps,
1.23 +(select count(*) from UserLogger where step not like 'UI_SOLVE%' and session=ul1.session limit 1) as Other_Steps
1.24 +from UserLogger ul1
1.25 +where UserName='x' and Step='LO_OPEN_WORKSHEET';
1.26 +
1.27 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.28 +[3]
1.29 +select Dialog, Step, Time, Worksheet, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
1.30 +from UserLogger
1.31 +where Session=123
1.32 +order by Time;
1.33 +
1.34 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.35 +[4]
1.36 +select Dialog, Step, Time, Worksheet, Position, FormulaFrom, FormulaTo, Argument, Substitution, Success
1.37 +from UserLogger
1.38 +where Worksheet='3_0'
1.39 +order by Time;
1.40 +
1.41 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.42 +[5]
1.43 +select Argument as ID, FormulaTo as Example, Success, Success as Failure
1.44 +from UserLogger
1.45 +where Step='LO_OPEN_WORKSHEET'
1.46 +order by Success, Failure;
1.47 +
1.48 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.49 +[6]
1.50 +select UserName, Argument as UserUrl,
1.51 +(select count(*) from UserLogger where step='LO_OPEN_WORKSHEET' and session=ul1.session limit 1) as Examples,
1.52 +(select Success from UserLogger where step='LO_STOP_EXAMPLE' and session=ul1.session limit 1) as Success,
1.53 +(select count(*) from UserLogger where step like 'UI_SOLVE%' and session=ul1.session limit 1) as Calc_Steps,
1.54 +(select count(*) from UserLogger where step not like 'UI_SOLVE%' and session=ul1.session limit 1) as Other_Steps
1.55 +from UserLogger ul1
1.56 +where Step='LO_START_SESSION'
1.57 +order by Examples, UserName;
1.58 +
1.59 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~