Replies: 2 comments 1 reply
-
Likely possible but we may need a way for sure to differentiate the different SQL dialects for the most common engine databases. |
Beta Was this translation helpful? Give feedback.
0 replies
-
A templatized approach is not appropriate as it does not exploit the natural flexibility of language models. We have already explored this in previous projects. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Great endeavor here and cool pic on the read me by the way!
Would like to propose a potential template, taking an example from SQL below to create the dataset, wdyt?
employees
has more than 5 rows, using theHAVING
clause withoutGROUP BY
.sql SELECT COUNT(*) AS employee_count FROM employees HAVING COUNT(*) > 5;
sql SELECT COUNT(*) FROM employees WHERE COUNT(*) > 5;
WHERE
clause is used for filtering individual rows, but here we need to filter based on an aggregate function. What could be the right approach?WHERE
for aggregate functions doesn’t work because it operates on individual rows, not aggregated data.- The
HAVING
clause is designed for filtering results based on aggregate functions likeCOUNT()
, even if there's noGROUP BY
.WHERE
, which is wrong becauseWHERE
applies before aggregation. I need to useHAVING
to filter based on the result ofCOUNT()
.sql SELECT COUNT(*) AS employee_count FROM employees HAVING COUNT(*) > 5;
Beta Was this translation helpful? Give feedback.
All reactions