Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Back to post

Revisions 2

one year ago
Rish
430 × 6 Administrator
Fix SQL queries with recursive prompts
Fix SQL queries with Recursive prompts
Prompt: error_prompt = f"""{query.sql} The query above produced the following error: {query.error} Rewrite the query with the error fixed:""" no_result_prompt = f"""{query.sql} The query above produced no result. Try rewriting the query so it will return results:"""
Prompt: error_prompt = f"""{query.sql} The query above produced the following error: {query.error} Rewrite the query with the error fixed:""" no_result_prompt = f"""{query.sql} The query above produced no result. Try rewriting the query so it will return results:"""
#query #query-builder #sql
#query #query-builder #sql
one year ago
Original
Rish
430 × 6 Administrator
Fix SQL queries with Recursive prompts

Prompt: error_prompt = f"""{query.sql} The query above produced the following error: {query.error} Rewrite the query with the error fixed:""" no_result_prompt = f"""{query.sql} The query above produced no result. Try rewriting the query so it will return results:"""
#query #query-builder #sql