最佳答案
INNER JOIN 可以完成这项工作。
SELECT
WindowsTable.Date,
ABS(WindowsTable.Sold - MacTable.Sold) absoluteDifference
FROM
(SELECT
*
FROM producttable
WHERE Products = 'Windows') WindowsTable
INNER JOIN
(
SELECT
*
FROM producttable
WHERE Products = 'Mac' ) MacTable
ON WindowsTable.Date = MacTable.Date;
关于mysql - 如何从另一个MySQL中减去一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36416549/