Template:Resultlink: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(an error in sample query corrected)
(updated to the new Base structure)
Line 4: Line 4:


{{#sql-query:
{{#sql-query:
SELECT Var.Ident, Var.Name, Var.Unit, Run.Ident, Inf.Begin, Inf.Who, Run.Name as Method
SELECT Var.Ident, Var.Name, Var.Unit, Run.Ident, Objinfo.Begin, Objinfo.Who, Run.Name as Method  
FROM Obj as Var, Obj as Run, Res, Inf
FROM Obj as Var, Obj as Run, Cell, Objinfo
WHERE Var.Ident = "Op_en{{PAGEID}}"  
WHERE Var.Ident = "Op_en{{PAGEID}}"  
AND Var.id = Res.Obj_id_v
AND Var.id = Cell.Obj_id_v  
AND Run.id = Res.Obj_id_r
AND Run.id = Cell.Obj_id_r  
AND Run.id = Inf.id
AND Run.id = Objinfo.id  
GROUP BY Var.id, Run.id
GROUP BY Var.id, Run.id
|Runs}} |  
|Runs}} |  
{{#sql-query:
{{#sql-query:
SELECT Var.Ident, Var.Name, Res.id, N, Inf.Begin, Mean, Var.Unit
SELECT Var.Ident, Var.Name, Cell.id, N, Objinfo.Begin, Mean, Var.Unit  
FROM Obj as Var, Obj as Run, Res, Inf
FROM Obj as Var, Obj as Run, Cell, Objinfo
WHERE Var.Ident = "Op_en{{PAGEID}}"  
WHERE Var.Ident = "Op_en{{PAGEID}}"
AND Var.id = Res.Obj_id_v
AND Var.id = Cell.Obj_id_v  
AND Run.id = Res.Obj_id_r
AND Run.id = Cell.Obj_id_r  
AND Run.id = Inf.id
AND Run.id = Objinfo.id  
GROUP BY Res.id
GROUP BY Cell.id ORDER BY Run.id DESC, Var.Ident
ORDER BY Run.id DESC, Var.Ident
|Means and samplesizes (N)}} |  
|Means and samplesizes (N)}} |  
{{#sql-query:
{{#sql-query:
SELECT Var.Ident, Res.id, Res.Obj_id_r as Run, Sample, Result, Var.Unit
SELECT Var.Ident, Cell.id, Cell.Obj_id_r as Run, Obs, Result, Var.Unit  
FROM Obj as Var, Res, Sam
FROM Obj as Var, Cell, Res  
WHERE Var.Ident = "Op_en{{PAGEID}}"  
WHERE Var.Ident = "Op_en{{PAGEID}}"
AND Var.id = Res.Obj_id_v
AND Var.id = Cell.Obj_id_v  
AND Res.id = Sam.Res_id
AND Cell.id = Res.Cell_id
ORDER BY Res.Obj_id_r, Var.Ident, Res.id
ORDER BY Cell.Obj_id_r, Var.Ident, Cell.id
|Full sample}}
|Full sample}}



Revision as of 11:53, 25 March 2009

Show results from the Opasnet Base

The newest result

{{#sql-query: SELECT Var.Ident, Var.Name, Var.Unit, Run.Ident, Objinfo.Begin, Objinfo.Who, Run.Name as Method FROM Obj as Var, Obj as Run, Cell, Objinfo WHERE Var.Ident = "Op_en2239" AND Var.id = Cell.Obj_id_v AND Run.id = Cell.Obj_id_r AND Run.id = Objinfo.id GROUP BY Var.id, Run.id |Runs}} | {{#sql-query: SELECT Var.Ident, Var.Name, Cell.id, N, Objinfo.Begin, Mean, Var.Unit FROM Obj as Var, Obj as Run, Cell, Objinfo WHERE Var.Ident = "Op_en2239" AND Var.id = Cell.Obj_id_v AND Run.id = Cell.Obj_id_r AND Run.id = Objinfo.id GROUP BY Cell.id ORDER BY Run.id DESC, Var.Ident |Means and samplesizes (N)}} | {{#sql-query: SELECT Var.Ident, Cell.id, Cell.Obj_id_r as Run, Obs, Result, Var.Unit FROM Obj as Var, Cell, Res WHERE Var.Ident = "Op_en2239" AND Var.id = Cell.Obj_id_v AND Cell.id = Res.Cell_id ORDER BY Cell.Obj_id_r, Var.Ident, Cell.id |Full sample}}


USAGE:
This template creates a link to a variable in result database.
First parameter is number of samples.

Development idea: Templaatti avaa tuloksen uuteen ikkunaan. Siellä on linkki, jota klikkaamalla tulee compare versions muuttujan nykyisestä wikisivusta ja siitä, joka oli voimassa sillä hetkellä kun muuttuja laskettiin tulostietokantaan.