Q:

Groupby with Where clause

I have a table PropertyViewer.  I need to Groupby 'ip_address' only Where 'property id' is same.  How should I do it in MYSQL? 

A:

SELECT * 
FROM `PropertyViewer`
GROUP BY `ip_address`, `property_id`;

You can change the ordering in `ip_address`, `property_id` in any way that suits your needs.