Difference between revisions of "Template:Resultbycountry"

From Testiwiki
Jump to: navigation, search
(emptied the query because it does not work)
 
Line 1: Line 1:
 +
<noinclude>
 
{{#sql-query:
 
{{#sql-query:
 
SELECT Cell.Obj_id_v AS Object, Cell_id AS Cell, Cell.Obj_id_r AS Upload, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj
 
SELECT Cell.Obj_id_v AS Object, Cell_id AS Cell, Cell.Obj_id_r AS Upload, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj
Line 13: Line 14:
 
GROUP BY Cell_id
 
GROUP BY Cell_id
 
LIMIT 0, 1000
 
LIMIT 0, 1000
|·{{{country}}} }}<noinclude>
+
|·{{{country}}} }}
 
This template is for downloading results from [[Opasnet base]] by country.
 
This template is for downloading results from [[Opasnet base]] by country.
 
</noinclude>
 
</noinclude>

Latest revision as of 03:20, 6 June 2009

{{#sql-query: SELECT Cell.Obj_id_v AS Object, Cell_id AS Cell, Cell.Obj_id_r AS Upload, Obj.Ident, Obj.Name, N, GROUP_CONCAT(Loc.Location SEPARATOR ', ') AS Location, Obj.Unit, Mean, SD FROM Obj JOIN (SELECT Obj_id_v, MAX(Obj_id_r) AS Obj_id_r FROM (SELECT * FROM Cell GROUP BY Obj_id_v, Obj_id_r) AS Temp GROUP BY Obj_id_v) AS Newest ON Obj.id=Newest.Obj_id_v JOIN Cell ON Newest.Obj_id_v=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_en3076" AND Cell.Obj_id_r=Newest.Obj_id_r AND Loc.Obj_id_i = 422 AND Loc.Location = "{{{country}}}" GROUP BY Cell_id LIMIT 0, 1000 |·{{{country}}} }} This template is for downloading results from Opasnet base by country.