History - Home Assistant
https://www.home-assistant.io/integrations/historyHistory The history integration will track everything that is going on within Home Assistant and allows the user to browse through it. It depends on the recorder integration for storing the data and uses the same database setting. If any entities are excluded from being recorded, no history will be available for these entities.
History Stats - Home Assistant
https://www.home-assistant.io/integrations/history_statsHistory Stats - Home Assistant History Stats The history_stats sensor platform provides quick statistics about another integration or platforms, using data from the history integration. It can track how long the integration has been in a specific state, in a custom time period. Examples of what you can track: How long you were at home this week
Recorder - Home Assistant
https://www.home-assistant.io/integrations/recorderHome Assistant uses SQLAlchemy, which is an Object Relational Mapper (ORM).This makes it possible to use a number of database solutions. The supported database solutions are: MariaDB ≥ 10.3; MySQL ≥ 8.0; PostgreSQL ≥ 12; SQLite ≥ 3.31.0; Although SQLAlchemy supports additional database solutions, it will behave differently on different databases, and features relied on by …