mysqlでjoinしながらgroupby

SELECT s.name, sum(u.price)
FROM syain AS s
LEFT JOIN uriage AS u ON s.syain_id = u.syain_id
group by s.name

sum()関数は必須です

未分類

Posted by admin8admin