更新时间:2022-12-12 10:54:36
已经给出了一些更好的专业答案,但这是***的理解方法
There are some better and professional answers already been given, but this one is best to understand what is going around
SELECT subname,
(SELECT subscribers
FROM reports_subreport
WHERE country ='1' AND mp='0'
AND date ='2013-10-15'
AND NOT(subname LIKE '%Test%')
ORDER BY site,subname LIMIT 1) AS sub1,
(SELECT subscribers
FROM reports_subreport
WHERE country ='1' AND mp='0'
AND date ='2013-10-08'
AND NOT(subname LIKE '%Test%')
ORDER BY site,subname LIMIT 1) AS sub2,
FROM reports_subreport WHERE country ='1' AND mp='0'
AND date ='2013-10-15' AND NOT(subname LIKE '%Test%')
ORDER BY site,subname