# Retrieving conversation from SQLTracker Store and continuing with the previous conversation

I found a thread where someone was asking something similar and he managed to find a solution. [Here](http://forum.rasa.com/t/solved-retrieving-conversation-from-mongotrackerstore-redistrackerstore-and-continuing-with-the-previous-conversation/3084) is the link. I'm just trying to figure out where did he place this piece of code.

## The gentlemen that started this thread said that the solution was this piece of code

```python
from rasa_core.trackers import DialogueStateTracker
tracker1 = DialogueStateTracker(sender_id, domain.slots)
events = db.retrieve(sender_id).as_dialogue().event
for event in events:
    tracker1.update(event)
```

I have saved user bot conversations in SQLTrackerstore which is saving the user-bot conversation. Suppose the user logs off and starts the conversation after some time with a different device (say phone). Is there any way to get the past conversations and continue our next conversation based on the …

Hey [@akelad](https://forum.rasa.com/u/akelad) from the above solution where do I insert the code? Would really appreciate your help on this.

[@ashukrishna100](https://forum.rasa.com/u/ashukrishna100)

Hie, where do you insert this piece of code? Inside actions.py? Could you show the sample of your code?

## Tracker store query configuration for Rasa

```yaml
tracker_store:
  type: SQL
  dialect: "mysql+pymysql"  # the dialect used to interact with the db
  url: "Mysql@127.0.0.1:3306"  # (optional) host of the sql db, e.g. "localhost"
  db: "dbrasa"  # path to your db
  username: "root"  # username used for authentication
  password: "root"  # …
```
