Is there a way to populate sql result in a table format in an email using script?

Hi Experts,

Is there a way to populate sql result in a table format in an email using script

 

Thanks 

Akshay