I would recommend SPARQL if you're using a more complex set of tables. These guys at Data World got almost 3× better results this way on more simple questions. The LLMs scored 0 on more complex question and dataworld got that to 36-38% accuracy: Link to paper
LLMs are better at querying knowledge graphs; especially if you want to make it more complex with multiple tables and databases. The are multiple papers on the topic other than the data world one.