> ## Documentation Index
> Fetch the complete documentation index at: https://help.elationhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# View When Your Data Was Last Refreshed

## View last refresh date from the UI

Start by accessing your data by

* Viewing left navigation bar
* Clicking on Data > Databases
* Click on any table in the ELATIONHEALTH*EHDW* database
* Then hover over the clock icon located underneath the header.

This will tell you the last time your practice had a full refresh of your data.

![Hovering over the clock icon on a table shows a tooltip: "Created on Jan 15, 2024, 4:03:11 AM." The clock icon displaying "8 hours ago" is highlighted with a red box.](https://mintcdn.com/elationhealth/aqLVKRo1Jpffmnwl/images/reference/hdb-last-refresh-clock-icon.png?fit=max\&auto=format\&n=aqLVKRo1Jpffmnwl\&q=85\&s=84620a64a9547ca9d76cd152e841f20a)

## View last refresh data via query

You can also run the below query to get insight into when your data was last refreshed. This method relies on the `hdb_last_sync` column, which is present on every table in your Hosted Database.

> [!NOTE]
>
> `hdb_last_sync` records when Elation's internal data store last refreshed a row from the source application. It does not represent when your Hosted Database as a whole completed its most recent refresh, nor the exact moment an individual record became available in your account.

> [!NOTE]
>
> This assumes your practice most often modifies appointments, visit note, or patient information and results the last time any of those tables were last\_modified.

```sql sql theme={null}
with visits_cte as(
select max(hdb_last_sync) as last_modified
from visit_note
)
,appointment_cte as(
select max(hdb_last_sync) as last_modified
from appointment
)
,patient_cte as(
select max(hdb_last_sync) as last_modified
from patient
)
,last_refreshed_date as(
select
*
from(
select
last_modified 
from visits_cte
union all
select last_modified
from appointment_cte
union all
select last_modified
from patient_cte
)
)
select 
max(last_modified) as last_refresh_date
from last_refreshed_date;
```

***

*If you have any questions about this topic please reach out to [Elation Support Portal](https://help.elationhealth.com/articles/support-portal-introduction.md) with the subject line HDB - \<your\_question>*
