我想将以下SQL查询转换为Laravel Eloquent或Query
SELECT County, SUM(Score) AS TotalScore
FROM (
SELECT County1 AS County, Player1_Score AS Score
FROM mytable
UNION ALL
SELECT County2, Player2_Score
FROM mytable) AS t
GROUP BY County
ORDER BY TotalScore DESC
我想转换成Laravel任何想法吗?
答案 0 :(得分:2)
尝试这样的事情:
function afterDraw() {
var g = document.getElementsByTagName("svg")[0].getElementsByTagName("g")[1];
document.getElementsByTagName("svg")[0].parentNode.style.top = '40px';
document.getElementsByTagName("svg")[0].style.overflow = 'visible';
var height = Number(g.getElementsByTagName("text")[0].getAttribute('y')) + 15;
g.setAttribute('transform','translate(0,-'+height+')');
g = null;
}