SELECT b.post_title, a.post_id, COUNT( * ) as Total
FROM wp_posts b INNER JOIN
wp_postmeta a ON a.post_id = b.ID
WHERE a.meta_value = 1
AND a.meta_key = 'type-select'
AND b.post_status = 'publish'
and post_type = 'car-cc'
GROUP BY b.post_title, a.post_id
目前它选择了post title
,post id
但我还需要选择一个meta value
where meta key = type-gen问题是另一个元键已经在查询中进行了比较。