标签:rod from rom name sel product png 图片 contract
SELECT IF(@ids=w.contract_id,@num:=@num,@num:=@num+1) AS num,@ids:=w.contract_id,w.* FROM
(SELECT (SELECT GROUP_CONCAT(project_name)
FROM production_income_data WHERE contract_id = a.contract_id) AS `names`,
(SELECT GROUP_CONCAT(project_code) FROM production_income_data
WHERE contract_id = a.contract_id) AS `codes`, a.*FROM production_income_data a )w
,(SELECT @num:=0) u,(SELECT @ids:=‘‘) m ORDER BY w.contract_id
标签:rod from rom name sel product png 图片 contract
原文地址:https://www.cnblogs.com/wjlwo2ni/p/11122278.html