1
Fork 0

change joins so natural is represented by separate field to on/using

some fixes and tweaks to the reserved keyword handling, especially in
  the typename parser
This commit is contained in:
Jake Wheat 2014-04-19 11:18:29 +03:00
parent 5d9a32a91d
commit fea6e347bd
7 changed files with 73 additions and 51 deletions
tools/Language/SQL/SimpleSQL

View file

@ -104,6 +104,8 @@ queries section
> ,"SELECT x FROM test1 GROUP BY x;"
> ,"SELECT x, sum(y) FROM test1 GROUP BY x;"
> -- s.date changed to s.datex because of reserved keyword
> -- handling, not sure if this is correct or not for ansi sql
> ,"SELECT product_id, p.name, (sum(s.units) * p.price) AS sales\n\
> \ FROM products p LEFT JOIN sales s USING (product_id)\n\
> \ GROUP BY product_id, p.name, p.price;"
@ -112,7 +114,7 @@ queries section
> ,"SELECT x, sum(y) FROM test1 GROUP BY x HAVING x < 'c';"
> ,"SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit\n\
> \ FROM products p LEFT JOIN sales s USING (product_id)\n\
> \ WHERE s.date > CURRENT_DATE - INTERVAL '4 weeks'\n\
> \ WHERE s.datex > CURRENT_DATE - INTERVAL '4 weeks'\n\
> \ GROUP BY product_id, p.name, p.price, p.cost\n\
> \ HAVING sum(p.price * s.units) > 5000;"