Table_A有entity_id
Table_B有一个相关的entity_id,attribute_id = 1
Table_B有一个相关的entity_id,attribute_id = 2
SELECT Table_B.value
FROM Table_A
LEFT JOIN Table_B
ON Table_A.entity_id = Table_B.entity_id
WHERE Table_A.date = '2012-7-30 00:00:00'
AND Table_B.attribute_id = 1
我想将attribute_id = 1 和attribute_id = 2 放入一个查询中。