# Is there anyway to save and pass the last run timestamp to SQL Extension Query

**URL:** <https://community.dynatrace.com/t/is-there-anyway-to-save-and-pass-the-last-run-timestamp-to-sql-extension-query/50067>\
**Category:** Extensions\
**Tags:** databases, oracle, extensions\
**Created:** [February 3, 2025, 10:03pm UTC](https://community.dynatrace.com/t/is-there-anyway-to-save-and-pass-the-last-run-timestamp-to-sql-extension-query/50067 "2025-02-03T22:03:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [February 3, 2025, 10:03pm UTC](https://community.dynatrace.com/t/is-there-anyway-to-save-and-pass-the-last-run-timestamp-to-sql-extension-query/50067/1 "2025-02-03T22:03:48Z")

</div>

Is there anyway to save and pass the last run timestamp to SQL Extension Query? I am looking for something similar to check point we can use in Splunk.

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [February 4, 2025, 2:18pm UTC](https://community.dynatrace.com/t/is-there-anyway-to-save-and-pass-the-last-run-timestamp-to-sql-extension-query/50067/2 "2025-02-04T14:18:21Z")

</div>

There is not although that would be useful. I couldn’t find any existing Ideas for this.

Currently, the closest you’d be able to get would be to use whatever syntax can express ‘last X minutes’ for example and having the X line up with your interval - it’s not perfect of course as there could be small variations in the interval resulting in small gaps not being covered. This is the approach we use in our extensions that need to query a rolling window.
