Similarity:
Having and Where both can be said to be as decision structures which are used in SQL to take an action to the data base or more specifically on any table of data base by matching a some sort of strings or values based on the values already present in the database.
Difference :
A WHERE clause is used is filter records from a result. The filter occurs before airy groupings are made. A HAVING clause is used to filter values from a group.