Police Scotland defines hate crime as:
Definition - Crime motivated by malice or ill will towards a social groupby:
Race.
Sexual orientation.
Religion/faith.
Disability.
Transgender/gender identity (Offences (Aggravated by Prejudice) Act 2010).
Hate crimes are abhorrentand target marginalised and vulnerable members of our communitieswith devastating effect on both victims and their families.
Police Scotland is committed to making it as easy as possible for victims to report hate crime.
We have identified hate crime as a high priority under the classification of violence, disorder and anti-social behaviour and continue to place a high priority on such crime, with the aim of:
Increasing the confidence of victims to report hate crimes/incidents.
Adopting a multi-agency response to dealing with hate crime.
Increasing action against perpetrators through intelligence led pro-active policing and robust enforcement.
We continually review incidents and crimes to identify current and new trends, and target our resources accordingly.
A hate incident is any incident that is not a criminal offence,but something which is perceived by the victim or any other person to be motivated by hate or prejudice.
There doesn't appear to be any limitation to what crimes are registered as hate crimes so it is perfectly possible for attempted murder to be classified as a hate crime with regard to motive, statistics, and recording while already attracting a maximum sentence.
I don't know what England and Wales law says. There is little UK-wide legislation on criminal law as the various jurisdictions are separate and distinct, similarly there are separate pieces of legislation even when the on matters reserved to Westminster.