Create a chatbot to query a local MySQL DB

Hi everyone, I just wanted to know if there is a pre-prepared template or existing solution for a simple chatbot that queries a local MySQL DB which is populated with (for example) fields of ID, Name, Age, Phone Number and Address. The bot should be able to interpret queries like:

1)Please provide the address of name/ID

2)Please provide the names of all entries older than 30 years (not necessary but nice to have)

I am feeling stuck in two parts as a beginner:

  1. How to implement the custom action required for this, and where (in which file) will the code such as creating a MySQL.connector cursor go?
  2. Will the query for a phone number and an address go in different intents in nlu.yml? I have seen Rachel’s Youtube tutorials where they go in the same intent (called inform in her example), but in that case how will Rasa be able to guess if we’re querying for a phone number or an address?

Any help will be warmly appreciated.