Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张桌子PropertyViewer。我Groupby 'ip_address'只需要 Where'property id'是一样的。我应该如何在MYSQL中做到这一点?
PropertyViewer
Groupby 'ip_address'
'property id'
SELECT * FROM `PropertyViewer` GROUP BY `ip_address`, `property_id`;
您可以在
`ip_address`、`property_id`
听起来您可能需要:
SELECT * FROM PropertyViewer GROUP BY property_id, ip_address;
这会将相同的项目property_id组合ip_address在一起。
property_id
ip_address