That is great when a site generates a new link like that.
I only saw that before on one other site, but it was really really helpful.
It had map icons and we could hold a button and drag an image on the map, the icon would duplicate.
Then when we had placed the changes, we could get a link to share the new look.
I had forgotten about that. I think I need to look into some of that functionality eventually.
http://sqlfiddle.com/#!18/cabb5/12
I have the singular pivot working here.
http://sqlfiddle.com/#!18/cabb5/14
I get an error using Efficiency after I added the proper parenthesis and averaging totals.
This works for me in Ignition, or maybe something slightly different.
[SQL Fiddle](https://
I got an operand error trying with OEE to determine if the pivot was the issue.
I think that Fiddle doesn't' handle this correctly, or maybe SQL in Ignition handles it when it should not.
avg(avg(D.OEE)) over(partition by Operator) as avgEffTotal,
avg(avg(D.OEE)) over() as deptAvgEff
This caused Fiddle to say directly that it had errored and not produce a link:
SELECT
Operator,
avg(avg(D.OEE)) over(partition by Operator) as avgEffTotal
FROM (
Select Line, Operator, Efficiency, OEE
from OPERATOR_EFF
) as D
GROUP BY Operator
This one had an operand datatype error:
http://sqlfiddle.com/#!18/cabb5/30
I think I can't use the Over() function in Fiddle.
Might be an issue that in Fiddle, the numbers are varchar.
I found a sort of zipping method that I didn't know was possible that I want to note for later.
http://sqlfiddle.com/#!18/d8ce13/1
edit:
Since Fiddle is completely broken at this very moment as they might be doing maintenance or having bad weather?
SELECT x.a, y.b FROM (SELECT * from a) as x, (SELECT * FROM b) as y
This was the querey that zipped.
I had inserted values (1),(2), (3),(4) into table a
values (1),(2) into table B
IIRC, I got a result like:
a b
1 1
2 1
3 1
4 1
1 2
2 2
3 2
4 2
This did not seem to work either:
SELECT
Operator,
MAX(B1) as "B1 EFF",
MAX(B2) as "B2 EFF",
MAX(B3) as "B3 EFF"
FROM (
Select Line, Operator, Efficiency, OEE
from OPERATOR_EFF
) as D
pivot ( max(Efficiency) for Line in (select distinct
case when Line = 'B3' then Line else Line+','end from OPERATOR_EFF as B)
) as pvt
GROUP BY Operator