Difference between revisions of "Template:Resultlink"
(a corrected (quick) query added) |
m |
||
Line 11: | Line 11: | ||
ORDER BY Run.id DESC | ORDER BY Run.id DESC | ||
|List of uploads|{{PAGENAME}}}} | | |List of uploads|{{PAGENAME}}}} | | ||
− | [http://base.opasnet.org/index.php?page_id={{PAGEID}}&wiki_id=1&sample={{{1|1}}} The newest upload] | + | [http://base.opasnet.org/index.php?page_id={{PAGEID}}&wiki_id=1&sample={{{1|1}}} The newest upload] | |
− | + | {{#sql-query: | |
SELECT Obj_id_v, Cell_id, Obj_id_r, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj | SELECT Obj_id_v, Cell_id, Obj_id_r, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj | ||
JOIN Cell ON Obj.id=Cell.Obj_id_v | JOIN Cell ON Obj.id=Cell.Obj_id_v | ||
Line 22: | Line 22: | ||
{{#if: {{{upload|}}}|AND Obj_id_r={{{upload}}}|}} | {{#if: {{{upload|}}}|AND Obj_id_r={{{upload}}}|}} | ||
GROUP BY Cell_id | GROUP BY Cell_id | ||
− | |Mean and SD}} | + | |Mean and SD}} | |
− | + | {{#sql-query: | |
SELECT Temp.*, Res.Obs, Res.Result FROM | SELECT Temp.*, Res.Obs, Res.Result FROM | ||
(SELECT Obj_id_v, Cell_id, Obj_id_r, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj | (SELECT Obj_id_v, Cell_id, Obj_id_r, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj | ||
Line 37: | Line 37: | ||
WHERE Obs<101 | WHERE Obs<101 | ||
|Sample (max 100 iterations)}} | |Sample (max 100 iterations)}} | ||
− | |||
− | |||
<noinclude> | <noinclude> | ||
'''USAGE:'''<br> | '''USAGE:'''<br> |
Revision as of 20:51, 3 June 2009
Show results from the Opasnet Base:
{{#sql-query: SELECT Var.Ident, Var.Name, Var.Unit, Run.Ident, Objinfo.Moment, 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.Obj_id GROUP BY Var.id, Run.id ORDER BY Run.id DESC |List of uploads|Resultlink}} | The newest upload | {{#sql-query: SELECT Obj_id_v, Cell_id, Obj_id_r, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj JOIN Cell ON Obj.id=Cell.Obj_id_v JOIN Loccell ON Cell.id=Loccell.Cell_id JOIN Loc AS Rawloc ON Loccell.Loc_id=Rawloc.id JOIN Loc ON Rawloc.Std_id=Loc.id JOIN Obj AS Ind ON Loc.Obj_id_i=Ind.id WHERE Obj.Ident="Op_en2239"
GROUP BY Cell_id |Mean and SD}} | {{#sql-query: SELECT Temp.*, Res.Obs, Res.Result FROM (SELECT Obj_id_v, Cell_id, Obj_id_r, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj JOIN Cell ON Obj.id=Cell.Obj_id_v JOIN Loccell ON Cell.id=Loccell.Cell_id JOIN Loc AS Rawloc ON Loccell.Loc_id=Rawloc.id JOIN Loc ON Rawloc.Std_id=Loc.id JOIN Obj AS Ind ON Loc.Obj_id_i=Ind.id WHERE Obj.Ident="Op_en2239"
GROUP BY Cell_id) AS Temp JOIN Res ON Temp.Cell_id=Res.Cell_id WHERE Obs<101 |Sample (max 100 iterations)}}
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.