【解决方案1】:

您可以对每个属性进行自联接。我对此有所猜测,因为您的示例数据与您显示的结果不匹配。

SELECT u.value AS userid,
  t.value AS total_entries,
  s.value AS products_sold
FROM mytable AS u
LEFT JOIN mytable AS t USING (sid)
LEFT JOIN mytable AS s USING (sid)
WHERE u.name='userid'
  AND t.name='total_entries'
  AND s.name='products_sold';

【讨论】: