Find answers from the community

Updated 5 months ago

I’m building a query pipeline for

I’m building a query pipeline for converting text to sql by following the tutorial given here:

https://docs.llamaindex.ai/examples/pipeline/query_pipeline_sql/

Sometimes the user query is such that it requires multiple SQL queries to be executed where the result of one query is needed as an input to the next query. In such cases while the SQL query is formulated correctly, it assumes results rather than executing the actual queries. What can I do to overcome this problem?
J
D
5 comments
Is this a case where you can suggest it use CTEs?
Sorry but I’m not aware what CTEs are
Might consider asking google or chatgpt.
Yes I did and you are right. These are indeed Common Table Expressions. So should I just prompt it to use CTEs ? Will give it a try
@JasonV worked like a charm! Thanks
Add a reply
Sign up and join the conversation on Discord